]> git.armaanb.net Git - charsel.git/commitdiff
switched to using makefile, and ~/.cache instead of /tmp
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Sun, 20 Sep 2020 22:26:33 +0000 (18:26 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Sun, 20 Sep 2020 22:26:33 +0000 (18:26 -0400)
INSTALL [deleted file]
README.md
src/charsel

diff --git a/INSTALL b/INSTALL
deleted file mode 100755 (executable)
index 74dd1d8..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/env sh
-# Make the folder in /tmp and make sure that it is writeable
-mkdir /tmp/charsel/
-chmod 777 /tmp/charsel/
-
-# Makes charsel executeable
-chmod +x src/charsel
-
-# Makes local folder
-mkdir -p ~/.local/share/charsel/charfiles/
-
-# 2 sets of commands for whether it is root or not
-if [ `whoami` == root ]; then
-  mkdir -p /usr/share/charsel/charfiles/
-  cp charfiles/* /usr/share/charsel/charfiles/
-  mkdir /usr/share/doc/charsel
-  cp README.md /usr/share/doc/charsel/
-  cp src/motd /usr/share/charsel
-  cp src/charsel /usr/bin/
-  exit
-else
-  cp charfiles/* ~/.local/share/charsel/charfiles/
-  cp src/motd ~/.local/share/charsel/
-  cp src/charsel ~/.local/bin/
-  exit
-fi
index a6d2af2562ef95753a56352a3bba3da8acdc2fa5..c5aaa701f8ced0962e9ddfb5ba043aae5776e990 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,9 +4,8 @@ A very simple shell script to make copying frequently used special characters to
 It uses a plain-text file known as a "charfile" to define shortcuts to special characters that are easy to access on the keyboard.
 
 ## Installation
-Running the INSTALL shell script should work fine for most people, or you could manually copy the files into place using it as a template.
-
-If it is run as root or with sudo, the program and charfiles will be installed for all users. If it is run without elevated privileges, it will just be installed for the local user.
+Run `make install` as root to install  
+Run `make uninstall` as root to remove. Will not delete your personal charfiles
 
 ## Dependencies
   * Posix shell  
index 80909d3f2751f49aa0fb01836801cefb0238954a..6713b599d56b097afc7931b652aa97c0a132f1eb 100755 (executable)
@@ -15,7 +15,8 @@
 
 #!/usr/bin/env sh
 # Merge both global and local charfiles
-CHARDIR=/tmp/charsel
+CHARDIR=~/.cache/charsel
+mkdir $CHARDIR/
 cp -R /usr/share/charsel/* $CHARDIR/
 cp -R ~/.local/share/charsel/* $CHARDIR/
 
@@ -39,7 +40,7 @@ CHARFILE=$CHARDIR/charfiles/$1
 LENGTH=$(cat $CHARFILE | cut -f 1 -d ',' -s | wc -L | cut -b 1)
 
 # MOTD
-cat /tmp/charsel/motd
+cat $CHARDIR/motd
 
 # Main program
 while :