From a1b412cf1fc9106463b3bd53b786804f1d0e7978 Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 22 Mar 2020 16:16:19 +0000 Subject: [PATCH] add lf install and configuration --- pkg-setup/lf.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 pkg-setup/lf.sh diff --git a/pkg-setup/lf.sh b/pkg-setup/lf.sh new file mode 100755 index 0000000..9cf4362 --- /dev/null +++ b/pkg-setup/lf.sh @@ -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'"