summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-11-15 21:52:23 +0100
committerDaniel Baumann <daniel@debian.org>2009-11-22 14:38:33 +0100
commitfbad988b41c31307782695eb8926a1c8b90929cb (patch)
treef13437ec5fb2b6a10ac33d53ef27d1347525730a
parent5107fd236fb078b23c0e239c5ab6ffdaef98bc49 (diff)
downloadvyos-live-build-fbad988b41c31307782695eb8926a1c8b90929cb.tar.gz
vyos-live-build-fbad988b41c31307782695eb8926a1c8b90929cb.zip
Installing helpers to /usr/share/live-helper/helpers instead of /usr/bin.
-rw-r--r--Makefile19
-rwxr-xr-xhelpers/lh5
2 files changed, 12 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 81527027f..aa61e1c4b 100644
--- a/Makefile
+++ b/Makefile
@@ -25,13 +25,13 @@ build:
@echo "Nothing to build."
install:
- # Installing executables
- mkdir -p $(DESTDIR)/usr/bin
- cp helpers/* $(DESTDIR)/usr/bin
-
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live-helper
- cp -r data examples live-helper.sh functions hooks includes lists templates $(DESTDIR)/usr/share/live-helper
+ cp -r data examples live-helper.sh functions helpers hooks includes lists templates $(DESTDIR)/usr/share/live-helper
+
+ # Installing executables
+ mkdir -p $(DESTDIR)/usr/bin
+ mv $(DESTDIR)/usr/share/live-helper/helpers/lh $(DESTDIR)/usr/share/live-helper/helpers/live-helper $(DESTDIR)/usr/bin
# Installing documentation
mkdir -p $(DESTDIR)/usr/share/doc/live-helper
@@ -64,15 +64,12 @@ install:
mkdir -p $(DESTDIR)/var/log
uninstall:
- # Uninstalling executables
- for HELPER in helpers/*; \
- do \
- rm -f $(DESTDIR)/usr/bin/$$(basename $$HELPER); \
- done
-
# Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live-helper
+ # Uninstalling executables
+ rm -f $(DESTDIR)/usr/bin/lh $(DESTDIR)/usr/bin/live-helper
+
# Uninstalling documentation
rm -rf $(DESTDIR)/usr/share/doc/live-helper
diff --git a/helpers/lh b/helpers/lh
index dd9c54543..ecf9b4ad5 100755
--- a/helpers/lh
+++ b/helpers/lh
@@ -34,7 +34,10 @@ case "${1}" in
COMMAND="${1}"
shift
- if [ -x "$(which lh_${COMMAND} 2>/dev/null)" ]
+ if [ -x /usr/share/live-helper/helpers/lh_${COMMAND} ]
+ then
+ LH=1 exec /usr/share/live-helper/helpers/lh_"${COMMAND}" "${@}"
+ elif [ -x "$(which lh_${COMMAND} 2>/dev/null)" ]
then
LH=1 exec lh_"${COMMAND}" "${@}"
else