add lf install and configuration

This commit is contained in:
Ray Elliott 2020-03-22 16:16:19 +00:00
parent 962efa9962
commit a1b412cf1f
1 changed files with 21 additions and 0 deletions

21
pkg-setup/lf.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
_cmd_su="su --login $_user -c"
_config_dir="/home/$_user/.config/lf"
set -e
_download_url="https://github.com/gokcehan/lf/releases/download/$_lf_version/lf-linux-amd64.tar.gz"
if [ -z $_config_loaded ] ; then
echo "No config loaded - loading '../config.sh'"
. ../config.sh
fi
# wget "$_download_url" -O /tmp/lf.tar.gz
# tar -xzvf /tmp/lf.tar.gz -C /usr/local/bin/
if [ -d "$_config_dir" ] ; then
rm -Rf "$_config_dir"
fi
$_cmd_su "git clone 'https://git.rayelliott.dev/dots/lf.git' '$_config_dir'"