elif
This commit is contained in:
@@ -9,11 +9,10 @@ fi
|
|||||||
if ! tty -s; then
|
if ! tty -s; then
|
||||||
# script is running non-interactively, for ex by clicking "Execute" in dolphin
|
# script is running non-interactively, for ex by clicking "Execute" in dolphin
|
||||||
zenity --password --title="Enter password for `whoami`" --timeout=10 | sudo --stdin -- \
|
zenity --password --title="Enter password for `whoami`" --timeout=10 | sudo --stdin -- \
|
||||||
konsole -e "$0" "$@"
|
konsole --hold -e "$0" "$@"
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
elif [[ $UID -ne 0 ]]; then
|
||||||
|
# script run in konsole, but without sudo
|
||||||
if [[ $UID -ne 0 ]]; then
|
|
||||||
echo "switching to root"
|
echo "switching to root"
|
||||||
sudo /bin/bash "$0" "$@"
|
sudo /bin/bash "$0" "$@"
|
||||||
exit $?
|
exit $?
|
||||||
@@ -30,4 +29,5 @@ pacman -S ncdu
|
|||||||
# SteamOS's wrapper for: btrfs property set -ts / ro true
|
# SteamOS's wrapper for: btrfs property set -ts / ro true
|
||||||
steamos-readonly enable
|
steamos-readonly enable
|
||||||
|
|
||||||
zenity --info --title='Result' --no-wrap --text='Done'
|
echo 'This window is now safe to close.'
|
||||||
|
# zenity --info --title='Result' --no-wrap --text='Done'
|
||||||
|
|||||||
Reference in New Issue
Block a user