Made install script easier to use

This commit is contained in:
Dreaded_X 2015-02-07 20:24:55 +01:00
parent 519f40ffdd
commit e3c4b611ef

View File

@ -1,10 +1,7 @@
#!/bin/bash
dotfiles="$HOME/$1"
# Show help
function show_help {
echo "Specify directory";
echo "Specify existing directory";
}
# Ask user
@ -56,7 +53,9 @@ function symlink {
echo "All symlink have been made"
}
dotfiles="$1"
if [ -z "$1" ]; then show_help; exit 0; fi;
if [ ! -d $1 ]; then show_help; exit 0; fi;
cd $dotfiles