Compare commits
No commits in common. "d1b53c92ede78a4068a6e7dbb5cf887712b51aac" and "9367fef8e91ebc59bac133abd71dffb1992dee4a" have entirely different histories.
d1b53c92ed
...
9367fef8e9
2 changed files with 10 additions and 8 deletions
4
bin/update-grub
Executable file
4
bin/update-grub
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
grub-mkconfig \
|
||||
-o /boot/grub/grub.cfg
|
||||
|
|
@ -1,26 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Variable
|
||||
commands_d="${HOME}/.local/share/updateall/commands.d"
|
||||
commands_d="$HOME/.local/share/updateall/commands.d"
|
||||
|
||||
# Function
|
||||
# Create a clear separator, adapts to the screen size
|
||||
function separator {
|
||||
local separator=""
|
||||
|
||||
local name="$1" ; shift
|
||||
local char="${1:-=}"; shift
|
||||
local char="${2:-=}"
|
||||
local separator cols
|
||||
(( cols = $(tput cols) / 3 ))
|
||||
|
||||
while [[ ${#separator} -le "$cols" ]]; do
|
||||
while [[ ${#separator} -le $cols ]]; do
|
||||
separator+="$char"
|
||||
done
|
||||
|
||||
printf '\n%s\n\t%s\n%s\n' "$separator" "$name" "$separator"
|
||||
printf '\n%s\n\t%s\n%s\n' "$separator" "$1" "$separator"
|
||||
}
|
||||
|
||||
# Loop
|
||||
for pm in "${commands_d}/"*; do
|
||||
for pm in "$commands_d/"*; do
|
||||
separator "$(basename "$pm")"
|
||||
source "$pm"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue