conf files no longer need to end in .conf
This commit is contained in:
parent
3b0c624966
commit
a2f96432d3
@ -4,12 +4,12 @@
|
||||
|
||||
echo "Creating new config file..."
|
||||
|
||||
echo -n "Please enter your first name: "
|
||||
read name
|
||||
if [ -z $name ]; then
|
||||
echo "Please input a value for your name before pressing enter"; exit 1
|
||||
echo -n "Please enter the file name of your config file: "
|
||||
read conf_file
|
||||
if [ -z $conf_file ]; then
|
||||
echo "Please input a value for your config file name before pressing enter"; exit 1
|
||||
fi
|
||||
conf_file="$name.conf"
|
||||
|
||||
if [ -e ./config/$conf_file ]; then
|
||||
echo "Sorry, the file ./scripts/$conf_file already exists. Either delete the existing file or choose a different name and try again."; exit 1
|
||||
fi
|
||||
|
||||
@ -4,14 +4,12 @@
|
||||
|
||||
echo "The availible config files are:"
|
||||
|
||||
ls ./config/ | sed s/asc.conf// | grep -F .conf | sed s/.conf//
|
||||
ls ./config/ | sed s/asc.conf// | sed -n '1!p' #print all conf files
|
||||
|
||||
cd config
|
||||
|
||||
echo -n "Please enter the config file you would like to use: "
|
||||
read username
|
||||
|
||||
conf_file="$username.conf"
|
||||
read conf_file
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user