Compare commits

..

No commits in common. "e95ccf042bd2d343b40bb6d09bf69d81e7fa2121" and "a71b682f49716670ad2b0b4a788ea5bafe866551" have entirely different histories.

4 changed files with 5 additions and 91 deletions

View File

@ -9,7 +9,7 @@ installed2() {
} }
apt_install() { apt_install() {
sudo apt install -y --autoremove $* sudo apt install -y --autoremove "$*"
} }
require() { require() {
@ -21,7 +21,7 @@ require() {
done done
if [ ${#sw[@]} -gt 0 ]; then if [ ${#sw[@]} -gt 0 ]; then
info "This packages will be installed in your system:\n${sw[*]}" info "This packages will be installed in your system:\n${sw[*]}"
apt_install ${sw[*]} apt_install "${sw[*]}"
[ $? -gt 0 ] && die "installation cancelled" 201 [ $? -gt 0 ] && die "installation cancelled" 201
fi fi
} }

View File

@ -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

View File

@ -1,19 +1,13 @@
#!/bin/bash #!/bin/bash
function disconnect() { function disconnect() {
echo "Disconnecting: $1" echo "Connecting to $1"
sudo wg-quick down "$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 echo
} }
function connect() { function connect() {
echo "Connecting: frkn-$1" echo "Disconnecting 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
sudo wg-quick up "frkn-$1" sudo wg-quick up "frkn-$1"
echo echo
} }
@ -61,7 +55,7 @@ Endpoint = $peer_endpoint
PersistentKeepalive = 25 PersistentKeepalive = 25
EOF EOF
done done
sudo mv -f ./frkn-*.conf /etc/wireguard/ sudo mv ./frkn-*.conf /etc/wireguard/
} }
command="$1" command="$1"

View File

@ -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"