switch-conf-file now takes in arguments for file to switch to
This commit is contained in:
parent
a2f96432d3
commit
3806ec07bb
@ -8,18 +8,22 @@ ls ./config/ | sed s/asc.conf// | sed -n '1!p' #print all conf files
|
|||||||
|
|
||||||
cd config
|
cd config
|
||||||
|
|
||||||
echo -n "Please enter the config file you would like to use: "
|
if [ -z "${1}" ]; then
|
||||||
read conf_file
|
echo -n "Please enter the config file you would like to use: "
|
||||||
|
read conf_file
|
||||||
|
else
|
||||||
|
conf_file="${1}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e $conf_file ]; then
|
if [ ! -e "${conf_file}" ]; then
|
||||||
echo "Sorry, the file ./scripts/$conf_file does not exist. Either create the file using npm run new-conf-file or choose a pre-existing config file."; exit 1
|
echo "Sorry, the file ./scripts/"${conf_file}" does not exist. Either create the file using npm run new-conf-file or choose a pre-existing config file."; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -h asc.conf ]; then
|
if [ -h asc.conf ]; then
|
||||||
rm asc.conf
|
rm asc.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -s $conf_file asc.conf
|
ln -s "${conf_file}" asc.conf
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user