-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
38 lines (31 loc) · 913 Bytes
/
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
ifndef VERBOSE
.SILENT:
endif
WHOAMI = $(shell whoami)
all:
@echo Pokemon Wallpapers
@echo ------------------------------
@echo To install run $$ sudo make install
@echo
@echo To unistall run $$ sudo make unistall
install:
if [ '$(WHOAMI)' = 'root' ] ; then \
echo "Installing Pokemon Wallpapers"; \
mkdir -pm755 /usr/share/backgrounds/pokemon/; \
for i in pokemon/* ; \
do \
echo "installing $$i"; \
install -Dm755 "$$i" "/usr/share/backgrounds/$$i"; \
done; \
echo "Pokemon Wallpapers have been installed succefully"; \
else \
echo "Cannot install Pokemon Wallpapers: Permission denied"; \
fi
uninstall:
if [ '$(WHOAMI)' = 'root' ] ; then \
echo "Uninstalling Pokemon Wallpapers"; \
rm -rf /usr/share/backgrounds/pokemon/; \
echo "Pokemon Wallpapers have been uninstalled succefully"; \
else \
echo "Cannot uninstall Pokemon Wallpapers: Permission denied"; \
fi