summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-29 00:45:49 +0100
committerdavidovski <david@davidovski.xyz>2022-05-29 00:45:49 +0100
commita53e2c8081b14125ebf8509d3d087ea2ecf3e03d (patch)
tree2641ff4ae1b6c8fd549d8761e431544f55ccb324
parent539e3027d80b939c27b5240782e2d01faf4241da (diff)
preserving /etcv1.4.1
-rw-r--r--src/install.sh6
1 files changed, 5 insertions, 1 deletions
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