This repository was archived by the owner on Sep 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,26 @@ BINDIR=$(PREFIX)/bin
55all :
66 @echo " Run 'make install' for installation."
77 @echo " Run 'make uninstall' for uninstallation."
8+ @echo " Run 'make reinstall' for installation without clobbering existing config file."
89
9- install :
10+ install-noconf :
1011 install -Dm755 create_ap $(DESTDIR )$(BINDIR ) /create_ap
11- install -Dm644 --backup=existing --suffix=.orig create_ap.conf $(DESTDIR ) /etc/create_ap.conf
1212 [ ! -d /lib/systemd/system ] || install -Dm644 create_ap.service $(DESTDIR )$(PREFIX ) /lib/systemd/system/create_ap.service
1313 [ ! -e /sbin/openrc-run ] || install -Dm755 create_ap.openrc $(DESTDIR ) /etc/init.d/create_ap
1414 install -Dm644 bash_completion $(DESTDIR )$(PREFIX ) /share/bash-completion/completions/create_ap
1515 install -Dm644 README.md $(DESTDIR )$(PREFIX ) /share/doc/create_ap/README.md
1616
17+ install : install-noconf
18+ [ -e $( DESTDIR) /etc/create_ap.conf ] && echo " Existing $( DESTDIR) /etc/create_ap.conf will be renamed with .orig suffix" >&2
19+ install -Dm644 --backup=existing --suffix=.orig create_ap.conf $(DESTDIR ) /etc/create_ap.conf
20+
21+ reinstall : install-noconf
22+ if [ -e $( DESTDIR) /etc/create_ap.conf ]; then \
23+ echo " Leaving existing $( DESTDIR) /etc/create_ap.conf unchanged" >&2 ; \
24+ else \
25+ install -Dm644 --backup=existing --suffix=.orig create_ap.conf $(DESTDIR ) /etc/create_ap.conf; \
26+ fi
27+
1728uninstall :
1829 rm -f $(DESTDIR )$(BINDIR ) /create_ap
1930 rm -f $(DESTDIR ) /etc/create_ap.conf
You can’t perform that action at this time.
0 commit comments