+++ /dev/null
-#!/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
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
#!/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/
LENGTH=$(cat $CHARFILE | cut -f 1 -d ',' -s | wc -L | cut -b 1)
# MOTD
-cat /tmp/charsel/motd
+cat $CHARDIR/motd
# Main program
while :