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
This commit is contained in:
Henning Heinold 2014-08-26 19:28:33 +02:00 committed by Holger Hans Peter Freyther
parent b39db0cdf7
commit 497be38b34
2 changed files with 2 additions and 2 deletions

View File

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

View File

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