aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/getplugs
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-05 17:52:33 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-05 17:52:33 +0530
commitd970a7416fcfd514a9dbd7db921e4fc03864ff3a (patch)
tree5402140d6e2680179b8b58d47f9b0ec631dde32c /plugins/getplugs
parentdd42726c5b5683f5ecea2224b64d27fbcf04941c (diff)
downloadnnn-d970a7416fcfd514a9dbd7db921e4fc03864ff3a.tar.gz
getplugs: backup earlier plugins
Diffstat (limited to 'plugins/getplugs')
-rwxr-xr-xplugins/getplugs5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/getplugs b/plugins/getplugs
index 14184c3..a42bab1 100755
--- a/plugins/getplugs
+++ b/plugins/getplugs
@@ -5,6 +5,11 @@
# Shell: POSIX compliant
# Author: Arun Prakash Jana
+# backup any earlier plugins
+if [ -d ~/.config/nnn/plugins ]; then
+ tar -C ~/.config/nnn/ -cf ~/.config/nnn/"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/
+fi
+
mkdir -p ~/.config/nnn/plugins
cd ~/.config/nnn/plugins
wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz