Compare commits
8 Commits
57b13b0463
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e478083e2 | |||
| 85be0b4d27 | |||
| 84d612ea02 | |||
| adc80cc5d3 | |||
| a135a04652 | |||
| 2d95828b3f | |||
| c2bccebbf4 | |||
| 2ac236219d |
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
@@ -1,3 +1,8 @@
|
|||||||
# helperScripts
|
# helperScripts
|
||||||
|
|
||||||
Helper Scripts for Task Automation of whatever annoys me
|
Helper Scripts for Task Automation of whatever annoys me
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://git.scypher.org/taicrafter/helperScripts/raw/branch/main/setup.sh | bash
|
||||||
|
```
|
||||||
@@ -1 +1,2 @@
|
|||||||
Example
|
yay
|
||||||
|
makemkv
|
||||||
5
arch/installers/makemkv.sh
Normal file
5
arch/installers/makemkv.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
yay -S makemkv
|
||||||
|
echo "Fixing Drive Permissions..."
|
||||||
|
echo sg | sudo tee /etc/modules-load.d/sg.conf
|
||||||
|
sudo modprobe sg
|
||||||
2
arch/installers/yay.sh
Normal file
2
arch/installers/yay.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sudo pacman -S yay
|
||||||
59
setup.sh
Executable file
59
setup.sh
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
URI="https://git.scypher.org/taicrafter/helperScripts/raw/branch/main"
|
||||||
|
function _promptBool(){
|
||||||
|
while true; do
|
||||||
|
read -r -p "$1 [y/n]: " res < /dev/tty
|
||||||
|
if [[ "$res" == "Y" || "$res" == "y" ]]; then
|
||||||
|
return 0;
|
||||||
|
elif [[ "$res" == "N" || "$res" == "n" ]]; then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
function detectOS(){
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
OS_TYPE="deb"
|
||||||
|
elif [ -f /etc/arch-release ]; then
|
||||||
|
OS_TYPE="arch"
|
||||||
|
else
|
||||||
|
echo "Unable to detect OS..."
|
||||||
|
if _promptBool "Manually set to Debian?"; then
|
||||||
|
OS_TYPE="deb"
|
||||||
|
elif _promptBool "Manually set to Arch?"; then
|
||||||
|
OS_TYPE="arch"
|
||||||
|
else
|
||||||
|
echo "Failed OS-Detection";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Detected OS-Type: $OS_TYPE"
|
||||||
|
export OS_TYPE
|
||||||
|
}
|
||||||
|
function AppInstaller(){
|
||||||
|
#Get App-List for OS
|
||||||
|
if _promptBool "Use Source: $URI?"; then
|
||||||
|
echo "Downloading App List..."
|
||||||
|
APPS=$(curl -fsSL "$URI/$OS_TYPE/apps.txt");
|
||||||
|
COUNT=$(echo "$APPS" | wc -l);
|
||||||
|
#TODO Handle 404 or 0 Installers
|
||||||
|
echo "Found $COUNT Installers..."
|
||||||
|
TMP_FILE=$(mktemp)
|
||||||
|
while IFS= read -r APPNAME; do
|
||||||
|
#Handle Install
|
||||||
|
if _promptBool "Install $APPNAME?"; then
|
||||||
|
SOURCE="$URI/$OS_TYPE/installers/$APPNAME.sh"
|
||||||
|
echo "Downloading Installer: $SOURCE"
|
||||||
|
curl -fsSL "$SOURCE" -o "$TMP_FILE"
|
||||||
|
bash "$TMP_FILE" < /dev/tty
|
||||||
|
echo "Finished $APPNAME Installer!"
|
||||||
|
fi
|
||||||
|
done <<< "$APPS"
|
||||||
|
else
|
||||||
|
echo "Aborted App-Installer!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
#Main
|
||||||
|
detectOS
|
||||||
|
if _promptBool "Run App-Installer?"; then
|
||||||
|
AppInstaller
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user