added readme and finished install script

This commit is contained in:
Josh Ashton
2024-02-12 20:32:03 -07:00
parent e97952e9eb
commit 992be20c10
3 changed files with 57 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# Utility scripts for Linux and MacOS.
# Installation:
`git clone https://github.com/quaxlyqueen/scripts`<br>
`cd scripts`<br>
`sudo ./install`<br>
# Features:
- Shortened Git commands with help information;
- Bookmarking directories in the terminal;
- Automated-installation scripts for Linux and MacOS projects;
- Project creation and universal code execution;
- Misc. i3-wm related theming and brightness/volume control
View File
+44
View File
@@ -13,4 +13,48 @@ echo "export PATH=$PATH:/usr/local/bin" >> ~/.zshrc
# Install the dependencies # Install the dependencies
echo "Installing dependencies..." echo "Installing dependencies..."
# Install github-cli # Install github-cli
if ! command -v "gh" &> /dev/null
then
echo "gh not found. Installing gh..."
COMMAND="gh"
PACKAGE="github-cli"
if [[ "$OSTYPE" == "darwin"* ]]; then
DISTRO=$(cat /etc/os-release | grep -oP '(?<=^ID=).+' | tr -d '"')
if [[ $DISTRO == "arch" ]]; then
yes | sudo pacman -S $PACKAGE
elif [[ $DISTRO == "archarm" ]]; then
yes | sudo pacman -S $PACKAGE
elif [[ $DISTRO == "ubuntu" ]]; then
yes | sudo apt-get install $PACKAGE
elif [[ $DISTRO == "fedora" ]]; then
yes | sudo dnf install $PACKAGE
elif [[ $DISTRO == "centos" ]]; then
yes | sudo yum install $PACKAGE
elif [[ $DISTRO == "debian" ]]; then
yes | sudo apt install $PACKAGE
else
echo "Unsupported distro. Please install $COMMAND from $PACKAGE manually."
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "gh not found. Installing gh..."
if command -v "brew" &> /dev/null
then
yes | brew install $COMMAND
elif command -v "port" &> /dev/null
then
yes | sudo port install $COMMAND
else
echo "Homebrew or MacPorts not found. Please install one of them before running this script."
exit 1
fi
fi
fi