mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
update setup file and add makefile to make simplify install
This commit is contained in:
parent
7b5c1fe52d
commit
1745810ade
20
Makefile
Normal file
20
Makefile
Normal 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
|
||||||
|
|
18
setup.sh
18
setup.sh
@ -1,15 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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 () {
|
log () {
|
||||||
printf "%s\n" "$1"
|
printf "%s\n" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
DIR="$HOME/.ani-cli/"
|
# DIR="$HOME/.ani-cli/"
|
||||||
DB="history.sqlite3"
|
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..."
|
log "Deleting old directory..."
|
||||||
rm -rf "$DIR"
|
# rm -rf "$DIR"
|
||||||
log "Directory deleted..."
|
log "Directory deleted..."
|
||||||
|
|
||||||
log "Creating directory $DIR"
|
log "Creating directory $DIR"
|
||||||
@ -25,3 +38,4 @@ log "Moving theme files..."
|
|||||||
cp themes/meh.rasi "$DIR"/
|
cp themes/meh.rasi "$DIR"/
|
||||||
cp themes/arc_dark_transparent_colors.rasi "$DIR"/
|
cp themes/arc_dark_transparent_colors.rasi "$DIR"/
|
||||||
log "Theme files moved..."
|
log "Theme files moved..."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user