sysmocom-backup: use transform option on restore

* when restoring links e.g. for systemd files
  the links will be created with content// prefix

* use transform instead of strip to remove
  the "content/" prefix

* bump PR
hfreyther/master-next
Henning Heinold 9 years ago committed by Holger Hans Peter Freyther
parent b39db0cdf7
commit 497be38b34

@ -5,7 +5,7 @@ do_extract() {
SEARCH=`tar -tvf $1 | grep $2`
RES=$?
if [ $RES = 0 ]; then
tar -C / -xvf $1 --strip=1 $2
tar --transform='s,^content/,,' -C / -xvf $1 $2
else
echo "Directory '$2' is not in backup '$1'."
fi

@ -1,7 +1,7 @@
DESCRIPTION = "sysmocom config backup and restore scripts"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
PR = "r10"
PR = "r11"
SRC_URI = "file://sysmocom-backup file://sysmocom-restore"
RDEPENDS_${PN} = "tar"

Loading…
Cancel
Save