1
0
mirror of https://github.com/limosek/zaf.git synced 2025-10-31 17:47:37 +01:00

Added debian package creation

This commit is contained in:
Lukas Macura
2016-04-07 13:14:53 +02:00
parent 081ac01e6b
commit ea6bf3d83a
7 changed files with 200 additions and 101 deletions

10
zaf
View File

@@ -8,6 +8,14 @@ else
exit 2
fi
# Read options as config for ZAF
for pair in "$@"; do
echo $pair | grep -q '^ZAF\_' || continue
option=$(echo $pair|cut -d '=' -f 1)
value=$(echo $pair|cut -d '=' -f 2-)
eval "${option}='$value'"
done
[ -z "$ZAF_TMP_BASE" ] && ZAF_TMP_BASE=/tmp/zaf
ZAF_TMP_DIR="${ZAF_TMP_BASE}-${USER}"
trap "rm -rif ${ZAF_TMP_DIR}" EXIT
@@ -127,6 +135,7 @@ remove)
;;
self-upgrade)
zaf_os_specific zaf_check_deps zaf && zaf_err "Zaf is installed as system package. Cannot self-upgrade."
rm -rf /tmp/zaf-installer && mkdir /tmp/zaf-installer
if ! which curl >/dev/null;
then
@@ -143,6 +152,7 @@ self-upgrade)
;;
self-remove)
zaf_os_specific zaf_check_deps zaf && zaf_err "Zaf is installed as system package. Cannot self-remove."
. /etc/zaf.conf
if [ "$2" = "force" ]; then
rm -rf /etc/zaf.conf ${ZAF_PLUGINS_DIR} ${ZAF_REPO_DIR} ${ZAF_LIB_DIR} \