Compare commits
No commits in common. "e95ccf042bd2d343b40bb6d09bf69d81e7fa2121" and "a71b682f49716670ad2b0b4a788ea5bafe866551" have entirely different histories.
e95ccf042b
...
a71b682f49
4
helpers
4
helpers
@ -9,7 +9,7 @@ installed2() {
|
||||
}
|
||||
|
||||
apt_install() {
|
||||
sudo apt install -y --autoremove $*
|
||||
sudo apt install -y --autoremove "$*"
|
||||
}
|
||||
|
||||
require() {
|
||||
@ -21,7 +21,7 @@ require() {
|
||||
done
|
||||
if [ ${#sw[@]} -gt 0 ]; then
|
||||
info "This packages will be installed in your system:\n${sw[*]}"
|
||||
apt_install ${sw[*]}
|
||||
apt_install "${sw[*]}"
|
||||
[ $? -gt 0 ] && die "installation cancelled" 201
|
||||
fi
|
||||
}
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
||||
|
||||
set -eo pipefail
|
||||
trap ontrap SIGINT SIGTERM SIGSTOP
|
||||
|
||||
ontrap() {
|
||||
echo
|
||||
echo "[!] Interrupted"
|
||||
exit
|
||||
}
|
||||
|
||||
[ -z "$1" ] && version=0.10.1 || version="$1"
|
||||
|
||||
filedir="$HOME/install/neovim-$version"
|
||||
filename="nvim-linux64.tar.gz"
|
||||
filepath="$filedir/$filename"
|
||||
configdir="$HOME/.config/nvim"
|
||||
localdir="$HOME/.local"
|
||||
|
||||
echo "[*] Installing neovim v$version"
|
||||
|
||||
if [ -d $configdir ]; then
|
||||
mv $configdir "$configdir.bak-$(date +'%Y%m%d_%H%M%S')"
|
||||
fi
|
||||
|
||||
mkdir -p $filedir $configdir $localdir/{bin,lib,share}
|
||||
|
||||
if [ ! -f $filepath ]; then
|
||||
echo "[*] Downloading to $filepath..."
|
||||
wget -q https://github.com/neovim/neovim/releases/download/v$version/nvim-linux64.tar.gz \
|
||||
-O $filepath \
|
||||
--show-progress
|
||||
fi
|
||||
|
||||
echo "[*] Unpacking: $filepath..."
|
||||
tar -zxf $filepath -C $filedir
|
||||
cp -rf $filedir/nvim-linux64/bin/nvim $localdir/bin/
|
||||
cp -rf $filedir/nvim-linux64/lib/nvim $localdir/lib/
|
||||
cp -rf $filedir/nvim-linux64/share $localdir/share
|
||||
rm -rf $filedir/nvim-linux64
|
||||
|
||||
echo "[*] Reinit git repo..."
|
||||
git clone https://github.com/LazyVim/starter \
|
||||
$configdir \
|
||||
--depth=1 \
|
||||
--single-branch
|
||||
cd $configdir
|
||||
rm -rf .git
|
||||
git init -q
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,19 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
function disconnect() {
|
||||
echo "Disconnecting: $1"
|
||||
echo "Connecting to $1"
|
||||
sudo wg-quick down "$1"
|
||||
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
||||
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
|
||||
echo
|
||||
}
|
||||
|
||||
function connect() {
|
||||
echo "Connecting: frkn-$1"
|
||||
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
|
||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||
echo "Disconnecting frkn-$1"
|
||||
sudo wg-quick up "frkn-$1"
|
||||
echo
|
||||
}
|
||||
@ -61,7 +55,7 @@ Endpoint = $peer_endpoint
|
||||
PersistentKeepalive = 25
|
||||
EOF
|
||||
done
|
||||
sudo mv -f ./frkn-*.conf /etc/wireguard/
|
||||
sudo mv ./frkn-*.conf /etc/wireguard/
|
||||
}
|
||||
|
||||
command="$1"
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
trap ontrap SIGINT SIGTERM SIGSTOP
|
||||
|
||||
ontrap() {
|
||||
echo
|
||||
echo "[!] Interrupted"
|
||||
exit
|
||||
}
|
||||
|
||||
echo "[*] Uninstalling neovim"
|
||||
|
||||
find "$HOME/.config" -type f -path "*/nvim*" -exec rm -rfv {} +
|
||||
find "$HOME/.local" -type f -path "*/nvim*" -exec rm -rfv {} +
|
||||
|
||||
echo "[*] Finish"
|
Loading…
Reference in New Issue
Block a user