-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (42 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
default:
@echo "creating directories..."
@touch user.txt; \
echo $(shell whoami) >> "user.txt"
install:
@echo "installing animenow..."
@echo "copying files to appropriate directories..."
@export user=$(shell cat user.txt); \
mkdir /home/$${user}/Animenow; \
cd main; \
cp -p bars.py /home/$${user}/Animenow; \
cp -p main.py /home/$${user}/Animenow; \
cp -rp counter /home/$${user}/Animenow; \
cp -rp data /home/$${user}/Animenow; \
cp -rp main /home/$${user}/Animenow; \
cp -p start.sh /home/$${user}/Animenow; \
echo "giving permissions..."; \
cd /home/$${user}/Animenow; \
chmod 777 start.sh; \
echo "creating binary..."; \
touch animenow.sh; \
echo "#!/bin/bash" >> animenow.sh; \
echo "cd /home/$${user}/Animenow" >> animenow.sh; \
echo "./start.sh" >> animenow.sh; \
chmod 777 animenow.sh; \
sudo cp animenow.sh /usr/bin/; \
cd /usr/bin/; \
sudo mv animenow.sh animenow; \
cd /home/$${user}/Animenow; \
rm animenow.sh; \
echo "...done installing"; \
cd ..; \
rm -fr animenow
uninstall:
@echo "uninstalling..."
@export user=$(shell cat user.txt); \
rm -fr /home/$${user}/Animenow; \
sudo rm /usr/bin/animenow; \
cd ..; \
rm -fr animenow
@echo "...done uninstalling"
.PHONY: default install uninstall