diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-06-20 19:10:47 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-06-20 19:17:00 +0530 |
commit | 2d1d17616058126ef4c7e156f5925006839a822f (patch) | |
tree | 49b3ffe60d60d25280672d660cb94225532ebfdb /plugins/getplugs | |
parent | 98a8eb1805f6f5df38dedb68ece57dc7b19bf52b (diff) | |
download | nnn-2d1d17616058126ef4c7e156f5925006839a822f.tar.gz |
Fix #288
Diffstat (limited to 'plugins/getplugs')
-rwxr-xr-x | plugins/getplugs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/getplugs b/plugins/getplugs index b460d83..a8d8ec1 100755 --- a/plugins/getplugs +++ b/plugins/getplugs @@ -5,13 +5,16 @@ # Shell: POSIX compliant # Author: Arun Prakash Jana +CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/ +PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins + # 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/ +if [ -d $PLUGIN_DIR ]; then + tar -C $CONFIG_DIR -cf $CONFIG_DIR"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/ fi -mkdir -p ~/.config/nnn/plugins -cd ~/.config/nnn/plugins +mkdir -p $PLUGIN_DIR +cd $PLUGIN_DIR wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz tar -xf master.tar.gz cp -vf nnn-master/plugins/* . |