]> arthur.barton.de Git - appify.git/blobdiff - appify.sh
Update usage message to denote parameters
[appify.git] / appify.sh
index 11c68279db47ec153a6fb9fadc258c63613767bb..537b74c8080422d8f4cc1f1924d8d183863b029f 100755 (executable)
--- a/appify.sh
+++ b/appify.sh
@@ -19,7 +19,7 @@
 args=$(getopt h $*)
 
 function usage {
-    echo "Usage: $0 [-h] script.sh target.app"
+    echo "Usage: $0 [-h] <script.sh> <target.app>"
     exit 2
 }
 
@@ -61,10 +61,10 @@ fi
 # done checking args; create the app
 #
 
-mkdir -p "$TARGET/Contents/MacOS"
-mkdir -p "$TARGET/Contents/Resources"
 umask 0022
 
+mkdir -p "$TARGET/Contents/MacOS" || exit 1
+mkdir -p "$TARGET/Contents/Resources" || exit 1
 
 cat <<EOF >"$TARGET/Contents/Info.plist"
 <?xml version="1.0" encoding="UTF-8"?>
@@ -87,5 +87,5 @@ cat <<EOF >"$TARGET/Contents/Info.plist"
 </plist>
 EOF
 
-cp "$SCRIPT" "$TARGET/Contents/MacOS/$BASENAME"
-chmod 755 "$TARGET/Contents/MacOS/$BASENAME"
+cp "$SCRIPT" "$TARGET/Contents/MacOS/$BASENAME" || exit 1
+chmod 755 "$TARGET/Contents/MacOS/$BASENAME" || exit 1