-
-
Save notabene00/d286c261e05f683aca30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then exit; fi | |
nameOfScript=`withoutPath=${1##*/};withoutExtension=${withoutPath%.*};echo $withoutExtension` #cuz it can be '*.sh', '*.py', '*.pl', '*.rb' and other files | |
folderOfScript="$nameOfScript.app/Contents/MacOS" | |
mkdir -p "$folderOfScript" | |
cp "$1" "$folderOfScript/$nameOfScript" | |
chmod +x "$folderOfScript/$nameOfScript" | |
echo "Seems like success." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment