]> git.armaanb.net Git - charsel.git/commitdiff
Small changes to improve usability
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 16 Sep 2020 14:47:49 +0000 (10:47 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 16 Sep 2020 14:47:49 +0000 (10:47 -0400)
INSTALL.sh
charsel

index 36dc18dec3dc4157cbd114f8dbc3902ccf9b2728..cd7c956ea7dda930d346e6cc4cc0a76d68f6bbf6 100755 (executable)
@@ -1,15 +1,16 @@
 #!/bin/env sh
 
+mkdir ~/.cache/charsel/
+chmod +x charsel
+
 if [ `whoami` == root ]; then
   mkdir -p /usr/share/charsel
   cp charfiles/* /usr/share/charsel/
-  chmod +x charsel
   cp charsel /usr/bin/
   exit
 else
   mkdir -p ~/.local/share/charsel
   cp charfiles/* ~/.local/share/charsel/
-  chmod +x charsel
   cp charsel ~/.local/bin/
   exit
 fi
diff --git a/charsel b/charsel
index 3961cf2f38bd47bd8b9aa3e0f2938fa8591ea270..01f1d3f4d7f18fc8e9ea1999bcdb8331ea6eafec 100755 (executable)
--- a/charsel
+++ b/charsel
@@ -1,12 +1,14 @@
 #!/usr/bin/env sh
 
 # Merge both global and local charfiles
-mkdir ~/.cache/charsel/ &
 cp /usr/share/charsel/* ~/.cache/charsel/
 cp ~/.local/share/charsel/* ~/.cache/charsel/
 CHARDIR=~/.cache/charsel
 
-# clear screen
+# Check if user provided a charfile
+[ -z "$1" ] && echo "No argument supplied"  && exit 1
+
+# Clear screen
 clear
 
 while :