From 03104eb1bf3901d5316eb5938a86d88b693ba6ba Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Sat, 11 Feb 2023 16:15:12 +1030 Subject: [PATCH] added simple scripts and updated --- .config/zsh/.zshrc | 2 +- .local/bin/chmox | 3 +++ .local/bin/runif | 7 +++++++ scripts/ganttproject | 2 +- scripts/plexamp | 4 +--- scripts/zotero | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) create mode 100755 .local/bin/chmox create mode 100755 .local/bin/runif diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 9223a40..7dd6618 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,6 +1,6 @@ # If you come from bash you might have to change your $PATH. export GOPATH="$HOME/go" -export PATH=$HOME/.local/bin:$GOPATH/bin:$PATH:$HOME/scripts +export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts # Path to your oh-my-zsh installation. export ZSH="/home/solomon/.oh-my-zsh" diff --git a/.local/bin/chmox b/.local/bin/chmox new file mode 100755 index 0000000..0a24b96 --- /dev/null +++ b/.local/bin/chmox @@ -0,0 +1,3 @@ +#!/bin/sh + +chmod +x "$@" diff --git a/.local/bin/runif b/.local/bin/runif new file mode 100755 index 0000000..9c168da --- /dev/null +++ b/.local/bin/runif @@ -0,0 +1,7 @@ +#!/bin/sh + +if [[ -x "$1" ]]; then + $1 +else + echo "$1 does not exist or couldn't be executed." +fi diff --git a/scripts/ganttproject b/scripts/ganttproject index bbe16cc..dcac279 100755 --- a/scripts/ganttproject +++ b/scripts/ganttproject @@ -1,3 +1,3 @@ #!/bin/bash -/opt/ganttproject/ganttproject +runif /opt/ganttproject/ganttproject diff --git a/scripts/plexamp b/scripts/plexamp index 291c78d..6d1f5d9 100755 --- a/scripts/plexamp +++ b/scripts/plexamp @@ -1,5 +1,3 @@ #!/bin/bash -if [ -f /usr/bin/Plexamp.AppImage ]; then - /usr/bin/Plexamp.AppImage -fi +runif /usr/bin/Plexamp.AppImage diff --git a/scripts/zotero b/scripts/zotero index 7f1edc7..3e913c3 100755 --- a/scripts/zotero +++ b/scripts/zotero @@ -1,3 +1,3 @@ #!/bin/sh -/opt/zotero/zotero +runif /opt/zotero/zotero