aboutsummaryrefslogtreecommitdiff
path: root/rose-mklink
diff options
context:
space:
mode:
authorfenze <fiedorowicz.kacper@gmail.com>2022-11-23 16:58:20 +0000
committerfenze <fiedorowicz.kacper@gmail.com>2022-11-23 16:58:20 +0000
commit0787f62e1676ebc6d295d5eb82eab8532dcf204f (patch)
tree390a9da3372f04a9a481ec750de5335c6493f42f /rose-mklink
parent00b64b6ee5f5849b9dedcb17140eab7b9202fc19 (diff)
fix style formatting
Diffstat (limited to 'rose-mklink')
-rwxr-xr-xrose-mklink7
1 files changed, 4 insertions, 3 deletions
diff --git a/rose-mklink b/rose-mklink
index eb878cf..a56f321 100755
--- a/rose-mklink
+++ b/rose-mklink
@@ -1,11 +1,12 @@
#!/bin/sh
-if [ "$1" = "--help" ] || [ -z "$1" ]; then
+test "$1" = "--help" || test -z "$1" && {
echo -e "usage: rose-mklink <alias> <url>\n"
echo "Create a /usr/bin link to a website."
-fi
+ exit
+}
-test -z "$1" || test -z "$2" || {
+test -z "$2" || {
[ -f "/usr/bin/$1" ] && {
echo "/usr/bin/$1 already exists, remove it first"
exit 1