summaryrefslogtreecommitdiffstats
path: root/files/post-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/post-functions.sh')
-rw-r--r--files/post-functions.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/files/post-functions.sh b/files/post-functions.sh
index b3beac8..ca61b2d 100644
--- a/files/post-functions.sh
+++ b/files/post-functions.sh
@@ -47,7 +47,7 @@ mergenew() {
;;
I|i)
if [ -f "${FULLNAME}.smerge" ]; then
- if [ -e "${FULLNAME}" ]; then
+ if [ -e "${FULLNAME}" ] && [ "$ORIG_BACKUPS" != "off" ]; then
mv "${FULLNAME}" "${FULLNAME}.orig"
fi
mv "${FULLNAME}.smerge" "${FULLNAME}"
@@ -101,7 +101,7 @@ overold() {
FILEPATH=$(dirname $i)
FULLNAME="${FILEPATH}/${BASENAME}"
- if [ -e ${FULLNAME} ]; then
+ if [ -e ${FULLNAME} ] && [ "$ORIG_BACKUPS" != "off" ]; then
mv ${FULLNAME} ${FULLNAME}.orig
fi
mv ${FULLNAME}.new ${FULLNAME}
@@ -141,15 +141,16 @@ looknew() {
-not -name "shadow.new" \
-not -name "gshadow.new" 2>/dev/null | sort 2>/dev/null)
if [ "$FILES" != "" ]; then
- echo -e "\n\
+ echo -ne "\n\
Some packages had new configuration files installed.
You have four choices:
(K)eep the old files and consider .new files later
- (O)verwrite all old files with the new ones. The
- old files will be stored with the suffix .orig
-
+ (O)verwrite all old files with the new ones"
+ [ "$ORIG_BACKUPS" != "off" ] && echo -ne ". The
+ old files will be stored with the suffix .orig"
+ echo -e "\n\n\
(R)emove all .new files
(P)rompt K, O, R selection for every single file