Fix input logprinti
This commit is contained in:
parent
5206cd40cc
commit
fddebef42b
|
@ -28,13 +28,13 @@ else
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
echo "$rpass" | sudo -S cp -r "nixos/" "/etc/"
|
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" = "" ]
|
if [ "$rebuild" = "" ]
|
||||||
set rebuild "y"
|
set rebuild "y"
|
||||||
end
|
end
|
||||||
set rebuild "$(string lower $rebuild)"
|
set rebuild "$(string lower $rebuild)"
|
||||||
if [ "$rebuild" = "y" ]
|
if [ "$rebuild" = "y" ]
|
||||||
echo "$rpass" | sudo nixos-rebuild switch
|
echo "$rpass" | sudo -S nixos-rebuild switch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
read -P "[INPUT] Git update Y/n: " gitpush
|
read -P "[INPUT] Git update Y/n: " gitpush
|
||||||
|
@ -55,3 +55,4 @@ end
|
||||||
|
|
||||||
cp -rf "temp/directorylisthashed.txt" "temp/directorylisthashedprevious.txt"
|
cp -rf "temp/directorylisthashed.txt" "temp/directorylisthashedprevious.txt"
|
||||||
rm "temp/directorylisthashed.txt"
|
rm "temp/directorylisthashed.txt"
|
||||||
|
|
||||||
|
|
|
@ -16,3 +16,11 @@ function logprintn
|
||||||
logprint $argv
|
logprint $argv
|
||||||
printf "\n"
|
printf "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function logprinti
|
||||||
|
set message "$(logprint "INPT" "green" "$argv[1]: ")"
|
||||||
|
if [ "$argv[2]" = "c" ]
|
||||||
|
read -P "$message" input
|
||||||
|
end
|
||||||
|
echo "$input"
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue