From a53e2c8081b14125ebf8509d3d087ea2ecf3e03d Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 29 May 2022 00:45:49 +0100 Subject: preserving /etc --- src/install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/install.sh b/src/install.sh index 20d582d..cfdcdf5 100644 --- a/src/install.sh +++ b/src/install.sh @@ -1,6 +1,7 @@ #!/bin/sh extract () { + # keep old files here, so we dont overwrite any configs tar -h --keep-old-files -p -vvxf $1 -C ${SYSROOT} 2>${LOG_FILE} | grep -v ^d | tr -s " " | cut -d" " -f6 | cut -c2- } @@ -28,7 +29,10 @@ install_package () { } ${VERBOSE} && printf "${BLACK}Extracting $name...\n" - extract $pkg_file > $files + + # dont overwrite anything in /etc; this is where configs are saved + # TODO define which files should be preserved + extract $pkg_file | grep -v '^/etc' > $files [ -f $info_file ] && cp $info_file $info echo $package_checksum > $checksum -- cgit v1.2.1