X-Git-Url: https://git.armaanb.net/?p=charsel.git;a=blobdiff_plain;f=src%2Fcharsel;h=80909d3f2751f49aa0fb01836801cefb0238954a;hp=b3dc78623b172d3f0aa75f1132c255167b97afce;hb=e36a2f02097f2db0b61dfda774514a60ecf50014;hpb=85a4c96299e44e38f7a1a8c9e38d863f29d9d111 diff --git a/src/charsel b/src/charsel index b3dc786..80909d3 100755 --- a/src/charsel +++ b/src/charsel @@ -1,22 +1,38 @@ +# Copyright 2020 Armaan Bhojwani + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + #!/usr/bin/env sh # Merge both global and local charfiles CHARDIR=/tmp/charsel cp -R /usr/share/charsel/* $CHARDIR/ -cp -R ~/.local/share/* $CHARDIR/ - -# Clear screen -clear +cp -R ~/.local/share/charsel/* $CHARDIR/ # Check if user provided an input -[ -z "$1" ] && echo "No argument supplied" && exit - if [ $1 = "list" ]; then echo "The following charfiles are installed" ls $CHARDIR/charfiles exit +elif [[ $1 = "help" || $1 = "-h" || $1 = "--help" || $# -ne 1 ]]; then + cat /usr/share/doc/charsel/README.md + exit else -# Define charfile +# Clear screen +clear + +# Define charfile path CHARFILE=$CHARDIR/charfiles/$1 # Define length of shortcut