update setup file and add makefile to make simplify install

This commit is contained in:
ksyasuda 2021-10-31 13:24:41 -07:00
parent 7b5c1fe52d
commit 1745810ade
2 changed files with 36 additions and 2 deletions

20
Makefile Normal file
View File

@ -0,0 +1,20 @@
PREFIX := /usr/local
all: install
install:
cp ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
cp aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
chmod 0755 $(DESTDIR)$(PREFIX)/bin/ani-cli
chmod 0755 $(DESTDIR)$(PREFIX)/bin/aniwrapper
dev:
ln -sr ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
ln -sr aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/ani-cli
$(RM) $(DESTDIR)$(PREFIX)/bin/aniwrapper
.PHONY: all install uninstall dev

View File

@ -1,15 +1,28 @@
#!/usr/bin/env bash
# Setup script to move the rofi theme files to the correct location
# As well as set up the history database
# DO NOT RUN AS ROOT
log () {
printf "%s\n" "$1"
}
DIR="$HOME/.ani-cli/"
# DIR="$HOME/.ani-cli/"
DB="history.sqlite3"
DIR="$XDG_CONFIG_HOME/ani-cli/"
[[ -z "$XDG_CONFIG_HOME" ]] && DIR="$HOME/.ani-cli"
printf "%s\n" "INSTALL DIR: $DIR"
if [[ "$DIR" == "$HOME/.config" ]]; then
printf "%s\n" "Maybe don't wanna delete that directory"
exit 1
fi
log "Deleting old directory..."
rm -rf "$DIR"
# rm -rf "$DIR"
log "Directory deleted..."
log "Creating directory $DIR"
@ -25,3 +38,4 @@ log "Moving theme files..."
cp themes/meh.rasi "$DIR"/
cp themes/arc_dark_transparent_colors.rasi "$DIR"/
log "Theme files moved..."