[fix-permissions] Use sudo password for permission for /usr/local

This commit is contained in:
Rico Tiongson 2018-02-28 00:48:40 +08:00
parent 91b55bad5e
commit 46db0b7f14

View File

@ -17,7 +17,8 @@ fi
abort () { abort () {
exec echo "Installation aborted" exec echo "Installation aborted"
} }
mkdir -p $(dirname $CONF_PATH) || abort sudo mkdir -p $(dirname $CONF_PATH) || abort
sudo chown $USER $(dirname $CONF_PATH)
if [ ! -f $CONF_PATH ]; then if [ ! -f $CONF_PATH ]; then
if [ ! -f $OLD_CONF_PATH ]; then if [ ! -f $OLD_CONF_PATH ]; then
# old config file not found, create from scratch # old config file not found, create from scratch