aboutsummaryrefslogtreecommitdiff
path: root/rose-mklink
diff options
context:
space:
mode:
authorbellrise <bellrise.dev@gmail.com>2022-11-19 14:37:13 +0100
committerbellrise <bellrise.dev@gmail.com>2022-11-19 14:37:13 +0100
commit00b64b6ee5f5849b9dedcb17140eab7b9202fc19 (patch)
treecf391074b222540e4e3ae4767d67385341a1024d /rose-mklink
parent5e7587dd992decae5baf16847e1ab0c3cdba3821 (diff)
nativefier: Rename to rose-mklink so its easier to grasp
Added a slightly more telling helppage, add added chmod +x /usr/bin/x so the link may actually be called.
Diffstat (limited to 'rose-mklink')
-rwxr-xr-xrose-mklink16
1 files changed, 16 insertions, 0 deletions
diff --git a/rose-mklink b/rose-mklink
new file mode 100755
index 0000000..eb878cf
--- /dev/null
+++ b/rose-mklink
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ "$1" = "--help" ] || [ -z "$1" ]; then
+ echo -e "usage: rose-mklink <alias> <url>\n"
+ echo "Create a /usr/bin link to a website."
+fi
+
+test -z "$1" || test -z "$2" || {
+ [ -f "/usr/bin/$1" ] && {
+ echo "/usr/bin/$1 already exists, remove it first"
+ exit 1
+ }
+
+ echo -e "#!/bin/sh\n\nrose $2" > /usr/bin/$1
+ chmod +x /usr/bin/$1
+}