nnn/plugins/getplugs

23 lines
619 B
Plaintext
Raw Permalink Normal View History

2019-04-19 13:34:20 +00:00
#!/usr/bin/env sh
# Description: Update nnn plugins
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
2019-06-20 13:40:47 +00:00
CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins
2019-06-05 12:22:33 +00:00
# backup any earlier plugins
2019-06-20 13:40:47 +00:00
if [ -d $PLUGIN_DIR ]; then
tar -C $CONFIG_DIR -cf $CONFIG_DIR"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/
2019-06-05 12:22:33 +00:00
fi
2019-06-20 13:40:47 +00:00
mkdir -p $PLUGIN_DIR
cd $PLUGIN_DIR
2019-09-27 15:31:55 +00:00
curl -Ls -O https://github.com/jarun/nnn/archive/master.tar.gz
2019-04-19 13:34:20 +00:00
tar -xf master.tar.gz
cp -vf nnn-master/plugins/* .
2019-06-16 16:51:13 +00:00
sudo mv -vf nnn-master/misc/nlaunch/nlaunch /usr/local/bin/
2019-04-19 13:34:20 +00:00
rm -rf nnn-master/ master.tar.gz README.md