mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Untabify: indentation is better as spaces not tabs
This commit is contained in:
parent
dbc2422d5d
commit
2aec4244a9
1 changed files with 11 additions and 11 deletions
22
runrole
22
runrole
|
@ -60,23 +60,23 @@ fi
|
||||||
echo
|
echo
|
||||||
if $REINSTALL; then # Add '_' so '--reinstall calibre' doesn't zap calibreweb
|
if $REINSTALL; then # Add '_' so '--reinstall calibre' doesn't zap calibreweb
|
||||||
if grep -q "^${ROLE_VAR}_" $IIAB_STATE_FILE; then
|
if grep -q "^${ROLE_VAR}_" $IIAB_STATE_FILE; then
|
||||||
echo -e "\e[1mThese line(s) in $IIAB_STATE_FILE are now being deleted:\e[0m\n"
|
echo -e "\e[1mThese line(s) in $IIAB_STATE_FILE are now being deleted:\e[0m\n"
|
||||||
grep "^${ROLE_VAR}_" $IIAB_STATE_FILE; echo
|
grep "^${ROLE_VAR}_" $IIAB_STATE_FILE; echo
|
||||||
sed -i "/^${ROLE_VAR}_/d" $IIAB_STATE_FILE
|
sed -i "/^${ROLE_VAR}_/d" $IIAB_STATE_FILE
|
||||||
else
|
else
|
||||||
echo -e "\e[1mERROR: $IIAB_STATE_FILE has no lines that begin with '${ROLE_VAR}_'\e[0m\n"
|
echo -e "\e[1mERROR: $IIAB_STATE_FILE has no lines that begin with '${ROLE_VAR}_'\e[0m\n"
|
||||||
echo -e "Try again without the '--reinstall' flag?\n"
|
echo -e "Try again without the '--reinstall' flag?\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if grep -q "^${ROLE_VAR}_" $IIAB_STATE_FILE; then
|
if grep -q "^${ROLE_VAR}_" $IIAB_STATE_FILE; then
|
||||||
echo -e "\e[1mWARNING: $IIAB_STATE_FILE already has this/these line(s):\e[0m\n"
|
echo -e "\e[1mWARNING: $IIAB_STATE_FILE already has this/these line(s):\e[0m\n"
|
||||||
grep "^${ROLE_VAR}_" $IIAB_STATE_FILE; echo
|
grep "^${ROLE_VAR}_" $IIAB_STATE_FILE; echo
|
||||||
echo -e "To reinstall it, run: ./runrole --reinstall $1\n"
|
echo -e "To reinstall it, run: ./runrole --reinstall $1\n"
|
||||||
echo -n "Or continue, e.g. to enable/disable it based on var '${ROLE_VAR}_enabled' ? [Y/n] "
|
echo -n "Or continue, e.g. to enable/disable it based on var '${ROLE_VAR}_enabled' ? [Y/n] "
|
||||||
read ans < /dev/tty
|
read ans < /dev/tty
|
||||||
echo
|
echo
|
||||||
[ "$ans" = "n" ] || [ "$ans" = "N" ] &&
|
[ "$ans" = "n" ] || [ "$ans" = "N" ] &&
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue