diff options
author | fenze <contact@fenze.dev> | 2023-02-07 12:48:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 12:48:14 +0100 |
commit | 1ba5fd7ecd81be1f54c812ac5e48eeff1652065b (patch) | |
tree | d5b0eef9ff7a7fb6bc528a99ed934e489a84a490 /rose-mklink | |
parent | 4e0b961fcb83e06c0375c45b4e63a809366dab02 (diff) | |
parent | 122437115dd0099246ce26866d808c75b36345b3 (diff) |
Merge pull request #39 from davidovski/shell_fix
Remove bash-only features for sh scripts
Diffstat (limited to 'rose-mklink')
-rwxr-xr-x | rose-mklink | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rose-mklink b/rose-mklink index 2aaba72..f016aae 100755 --- a/rose-mklink +++ b/rose-mklink @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh test "$1" = "--help" || test -z "$1" && { - echo -e "usage: rose-mklink <alias> <url>\n" - echo "Create a /usr/bin link to a website." + printf "%s\n" "usage: rose-mklink <alias> <url>" \ + "Create a /usr/bin link to a website." exit } @@ -12,6 +12,6 @@ test -z "$2" || { exit 1 } - echo -e "#!/bin/sh\n\nrose $2" > /usr/bin/$1 + printf "#!/bin/sh\n\nrose %s" "$2" > /usr/bin/$1 chmod +x /usr/bin/$1 } |