Oliver Schneider avatar Oliver Schneider committed 0040d82

- Small improvements to the script skeleton

Comments (0)

Files changed (1)

dotfile_installer.sh.in

 SDIR=${SELF%/*}
 SELF=${SELF##*/}
 DIRSELF="$SDIR/$SELF"
+[[ "x$1" == "x--help" ]] && { echo "Syntax: $SELF [target-directory]"; exit 255; }
 TGTDIR=${1:-$HOME}
 DOTF=".dotfiles"
 
 # error_exit <exit-code> <error-string>
 function error_exit
 {
-
 	exit $1
 }
 
 	exit 0
 }
 
-read -p "Install $DIRSELF and copy .bashrc and friends into $TGTDIR? " ans
+read -p "Install $DIRSELF and copy .bashrc and friends into $TGTDIR (^C to cancel)? " ans
 if [[ "${ans:0:1}"  ||  "${ans:0:1}" ]]; then
 	(
 		( untar_payload "$TGTDIR" ) || { ERR=$?; print_error "at [$FUNCNAME:$LINENO]"; exit $ERR; }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.