From 7ba342eb3da4f49646ba23c086ab990ad45ec7a3 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 20 Nov 2015 15:18:23 +0000 Subject: [PATCH] * preserve userdata when upgrading --- installer/spk/scripts/postupgrade | 6 ++++++ installer/spk/scripts/preupgrade | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/installer/spk/scripts/postupgrade b/installer/spk/scripts/postupgrade index 039e4d00..cfacd161 100644 --- a/installer/spk/scripts/postupgrade +++ b/installer/spk/scripts/postupgrade @@ -1,2 +1,8 @@ #!/bin/sh + +# import user data +DATA_TAR="/tmp/$SYNOPKG_PKGNAME.data.tgz" + +cd "$SYNOPKG_PKGDEST" && tar -xvzf "$DATA_TAR" && rm "$DATA_TAR" + exit 0 diff --git a/installer/spk/scripts/preupgrade b/installer/spk/scripts/preupgrade index 039e4d00..d386fd24 100644 --- a/installer/spk/scripts/preupgrade +++ b/installer/spk/scripts/preupgrade @@ -1,2 +1,8 @@ #!/bin/sh + +# export user data +DATA_TAR="/tmp/$SYNOPKG_PKGNAME.data.tgz" + +cd "$SYNOPKG_PKGDEST" && tar -cvzf "$DATA_TAR" "data/" + exit 0