diff options
| author | Jokler <jokler.contact@gmail.com> | 2019-05-14 22:13:09 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2019-05-14 22:13:09 +0200 |
| commit | 64b3f5883e5523e5193ba1583790cc8cfafcfe6e (patch) | |
| tree | 8c604f28ede436cb2f43bd0a1c3c70d4e12461e6 /scripts/autoscript | |
| download | dotfiles-64b3f5883e5523e5193ba1583790cc8cfafcfe6e.tar.gz dotfiles-64b3f5883e5523e5193ba1583790cc8cfafcfe6e.zip | |
Add scripts, polybar and i3 config files
Diffstat (limited to 'scripts/autoscript')
| -rwxr-xr-x | scripts/autoscript | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/autoscript b/scripts/autoscript new file mode 100755 index 0000000..c29bcc9 --- /dev/null +++ b/scripts/autoscript @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ "$#" -ne 1 ]; then + echo "Exactly 1 argument is required" + exit +fi + +SCRIPT_FOLDER="$HOME/scripts" +SCRIPT_FILE="$SCRIPT_FOLDER/$1" + +if [[ -f $SCRIPT_FILE ]]; then + gvim $SCRIPT_FILE +else + echo -e '#!/bin/bash\n\n# vim: expandtab sw=2 ts=2' > $SCRIPT_FILE + chmod +x $SCRIPT_FILE + gvim $SCRIPT_FILE & +fi + +# vim: expandtab sw=2 ts=2 |
