updated scripts to be a bit less cringe

This commit is contained in:
Solomon Laing 2022-11-01 11:52:24 +10:30
parent ec4e4185e4
commit f2dd7ab51a
6 changed files with 18 additions and 21 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
tags

12
install
View File

@ -1,6 +1,10 @@
#!/bin/bash
#!/usr/bin/env bash
mkdir -p $HOME/.local/bin
mkdir -p "$HOME/.local/bin"
cp scripts/* $HOME/.local/bin
cp scripts/cron/* $HOME/.local/bin
# If in the scripts folder ...
if [[ $(pwd) == *"/scripts"* ]]; then
cp -r ./* "$HOME/.local/bin"
else
cp -r ./scripts/* "$HOME/.local/bin"
fi

View File

@ -1,3 +0,0 @@
#!/bin/bash
sudo cp scripts/* /usr/local/bin

5
uninstall Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
for script in ./scripts/*; do
sudo rm "$HOME/.local/bin/$script"
done

View File

@ -1,7 +0,0 @@
#!/bin/bash
scripts=$(ls scripts)
for script in $scripts; do
sudo rm /usr/local/bin/$script
done

View File

@ -4,14 +4,11 @@
# I use some of his scripts and although they don't often update, they are known to.
# The output is going to include a bunch of copy errors as I'm just copying each file in this directory from his .local/bin back to here, obviously my custom scripts won't exist so they'll fail.
scripts=$(ls scripts)
crons=$(ls scripts/cron)
for script in $scripts; do
cp ../voidrice/.local/bin/$script ./scripts/ -v
for script in ./scripts/*; do
cp "../voidrice/.local/bin/$script" ./scripts/ -v
done
for cron in $crons; do
cp ../voidrice/.local/bin/cron/$cron ./scripts/cron/ -v
for cron in ./scripts/cron/*; do
cp "../voidrice/.local/bin/cron/$cron" ./scripts/cron/ -v
done