summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Scott <scottj@sou.edu>2020-11-22 11:51:27 -0800
committerJake Scott <scottj@sou.edu>2020-11-22 11:51:27 -0800
commitdeda2254f33c31541296de688c2caeb49ab6ba9d (patch)
treeaaf209983e9259447bd39c65dde892fd5fff3de9
parentc34d0281bd6903a42a44e1e4504a204e3b7ee01f (diff)
shellcheck pass all functions
-rwxr-xr-xinit2
-rwxr-xr-xls2
-rwxr-xr-xrm2
3 files changed, 4 insertions, 2 deletions
diff --git a/init b/init
index 5d30974..f384f3e 100755
--- a/init
+++ b/init
@@ -22,5 +22,5 @@ if [ -d "$new_repo" ]; then
fi
mkdir "$base_dir/$new_repo"
-git init --bare "$base_dir/$new_repo" 2>&1>/dev/null \
+git init --bare "$base_dir/$new_repo" >/dev/null 2>&1\
&& echo "Initialized empty Git repository: git@$(uname -n):$new_repo"
diff --git a/ls b/ls
index 234fae4..c7da128 100755
--- a/ls
+++ b/ls
@@ -1,3 +1,3 @@
#!/bin/sh
-find $HOME -maxdepth 1 -type d -name '*\.git' -printf "%f\n"
+find "$HOME" -maxdepth 1 -type d -name '*\.git' -printf "%f\n"
diff --git a/rm b/rm
index 0c1ee10..f85a305 100755
--- a/rm
+++ b/rm
@@ -23,4 +23,6 @@ if [ -d "$target" ]; then
rm -rf "${base_dir:?}/${target:?}" \
&& echo "${target} deleted"
fi
+else
+ echo "$target does not exist."
fi