summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Webster2020-08-08 22:59:25 -0700
committerDonald Webster2020-08-08 22:59:25 -0700
commit3362f7225761d42eccceef1dfbbaa4512e9865e0 (patch)
tree17de8f8a5ff1ca9e1e3981c52a65735ea9d9af43
parentc8987aade985526cccb2b5d0b5b1f8609788c6d0 (diff)
downloadaur-3362f7225761d42eccceef1dfbbaa4512e9865e0.tar.gz
Switch from mv to cp, rename old files/folders to .saved.
-rw-r--r--PKGBUILD2
-rw-r--r--sabnzbd.install15
2 files changed, 10 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1815ff5d396..7c3b3aa4ea6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=sabnzbd
pkgver=3.0.0
-pkgrel=2
+pkgrel=3
pkgdesc='A web-interface based binary newsgrabber with NZB file support'
url='http://www.sabnzbd.org'
arch=('any')
diff --git a/sabnzbd.install b/sabnzbd.install
index ae81376f6a3..096af080447 100644
--- a/sabnzbd.install
+++ b/sabnzbd.install
@@ -1,20 +1,23 @@
post_upgrade() {
# Test for the *old* config file and *lack* of new config file, move if needed.
if [[ -f /opt/sabnzbd/sabnzbd.ini && ! -f /var/lib/sabnzbd/sabnzbd.ini ]]; then
- mv /opt/sabnzbd/sabnzbd.ini /var/lib/sabnzbd/
- echo "Moved sabnzbd.ini from /opt/sabnzbd to /var/lib/sabnzbd."
+ cp -a /opt/sabnzbd/sabnzbd.ini /var/lib/sabnzbd/
+ mv /opt/sabnzbd/sabnzbd.ini /opt/sabnzbd/sabnzbd.ini.saved
+ echo "Copied sabnzbd.ini from /opt/sabnzbd to /var/lib/sabnzbd and renamed /opt/sabnzbd/sabnzbd.ini to /opt/sabnzbd/sabnzbd.ini.saved."
fi
# Test for old admin folder and *lack* of new admin folder, move if needed.
if [[ -d /opt/sabnzbd/admin && ! -d /var/lib/sabnzbd/admin ]]; then
- mv /opt/sabnzbd/admin /var/lib/sabnzbd/
- echo "Moved admin folder from /opt/sabnzbd to /var/lib/sabnzbd/."
+ cp -a /opt/sabnzbd/admin /var/lib/sabnzbd/
+ mv /opt/sabnzbd/admin /opt/sabnzbd/admin.saved
+ echo "Copied admin folder from /opt/sabnzbd to /var/lib/sabnzbd/ and renamed /opt/sabnzbd/admin to /opt/sabnzbd/admin.saved."
fi
# Test for old logs folder and *lack* of new logs folder, move if needed.
if [[ -d /opt/sabnzbd/logs && ! -d /var/lib/sabnzbd/logs ]]; then
- mv /opt/sabnzbd/logs /var/lib/sabnzbd/
- echo "Moved logs folder from /opt/sabnzbd to /var/lib/sabnzbd/."
+ cp -a /opt/sabnzbd/logs /var/lib/sabnzbd/
+ mv /opt/sabnzbd/logs /opt/sabnzbd/logs.saved
+ echo "Moved logs folder from /opt/sabnzbd to /var/lib/sabnzbd/ and renamed /opt/sabnzbd/logs to /opt/sabnzbd/logs.saved."
fi
# Test for old install location, suggest removal.