Fix input logprinti

This commit is contained in:
ark-lamp-umbrella 2024-04-12 20:06:51 -07:00
parent 5206cd40cc
commit fddebef42b
Signed by: ark-lamp-umbrella
GPG Key ID: 15E48F7B97025652
2 changed files with 11 additions and 2 deletions

View File

@ -28,13 +28,13 @@ else
exit 0
end
echo "$rpass" | sudo -S cp -r "nixos/" "/etc/"
read -P "[INPUT] Trigger rebuild Y/n: " rebuild
set rebuild "$(logprinti "trigger rebuild (Y/n)" "c")"
if [ "$rebuild" = "" ]
set rebuild "y"
end
set rebuild "$(string lower $rebuild)"
if [ "$rebuild" = "y" ]
echo "$rpass" | sudo nixos-rebuild switch
echo "$rpass" | sudo -S nixos-rebuild switch
end
end
read -P "[INPUT] Git update Y/n: " gitpush
@ -55,3 +55,4 @@ end
cp -rf "temp/directorylisthashed.txt" "temp/directorylisthashedprevious.txt"
rm "temp/directorylisthashed.txt"

View File

@ -16,3 +16,11 @@ function logprintn
logprint $argv
printf "\n"
end
function logprinti
set message "$(logprint "INPT" "green" "$argv[1]: ")"
if [ "$argv[2]" = "c" ]
read -P "$message" input
end
echo "$input"
end