Made install script easier to use

This commit is contained in:
Dreaded_X 2015-02-07 20:24:55 +01:00
parent 865912aed4
commit bd3a7e5c87

View File

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