config: fix bootstrap issues
This commit is contained in:
parent
f907128446
commit
bf05f9f175
|
@ -70,12 +70,15 @@ edshell() {
|
|||
(prof*) file="$HOME/.zprofile";;
|
||||
(-f) grepfile="$(grep --recursive "\(^$2()\|alias $2=\)" $CONFIG_SHELLS -n -m 1)"
|
||||
file="$(echo "$grepfile" | cut -d':' -f1)"
|
||||
line="$(echo "$grepfile" | cut -d':' -f2)";;
|
||||
line="$(echo "$grepfile" | cut -d':' -f2)"
|
||||
test -f "$file" || return 2;;
|
||||
(*) file="$(find $CONFIG_SHELLS -name "$1*" | head -1 | grep . || echo "$CONFIG_SHELLS/$1")";;
|
||||
esac
|
||||
test -f "$file" || checksum="$(md5sum "$file")"
|
||||
test -f "$file" && checksum="$(md5sum "$file")"
|
||||
$EDITOR "$(test "$line" && echo "+normal! ${line}ggzx" || echo "--")" "${file%:*}"
|
||||
test "$checksum" != "$(md5sum $file)" && source "$HOME/.zprofile" && exec $SHELL
|
||||
#test -f "$file" || return 1
|
||||
test "$checksum" != "$(md5sum $file)" &&
|
||||
source "$HOME/.zprofile" && exec $SHELL
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ test -d "/etc/yadm" || sy clone
|
|||
## Software
|
||||
section "Software"
|
||||
link() {
|
||||
test -e "$2" || $(checkacess -w "$2" || echo sudo) ln -sv "$@"
|
||||
test -e "$2" || $(checkaccess -w "$2" || echo sudo) ln -sv "$@"
|
||||
}
|
||||
|
||||
mkdir -p .config/audacity
|
||||
|
|
|
@ -6,8 +6,8 @@ case "$1" in
|
|||
("") sysyadm s;;
|
||||
(p) sysyadm p;;
|
||||
(l) sysyadm fetch && sy rebase main --onto origin/main;;
|
||||
(clone) sysyadm clone -w / git.jfischer.org:xeruf/etc.git --bootstrap;;
|
||||
(init) sysyadm init -b main -w /;;
|
||||
(clone) sudo -E sysyadm clone -w / git.jfischer.org:xeruf/etc.git --bootstrap;;
|
||||
(init) sudo -E sysyadm init -b main -w /;;
|
||||
(*) sudo -E sysyadm "$@";;
|
||||
esac
|
||||
sudo chown -R $USER /etc/yadm
|
||||
|
|
Loading…
Reference in New Issue