From 1513db21226acbb1d8bc830f8b952c56ba123de8 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Wed, 16 Sep 2020 10:47:49 -0400 Subject: [PATCH] Small changes to improve usability --- INSTALL.sh | 5 +++-- charsel | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/INSTALL.sh b/INSTALL.sh index 36dc18d..cd7c956 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -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 3961cf2..01f1d3f 100755 --- 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 : -- 2.39.2