mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
23 lines
632 B
Bash
Executable file
23 lines
632 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# Description: Update nnn plugins
|
|
#
|
|
# 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 $PLUGIN_DIR ]; then
|
|
tar -C $CONFIG_DIR -cf $CONFIG_DIR"plugins-$(date '+%Y%m%d%H%M').tar.bz2" plugins/
|
|
fi
|
|
|
|
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/* .
|
|
sudo mv -vf nnn-master/misc/nlaunch/nlaunch /usr/local/bin/
|
|
rm -rf nnn-master/ master.tar.gz README.md
|