test
This commit is contained in:
parent
010350c2bf
commit
4513080352
1
dependencies/curl.dep
vendored
Normal file
1
dependencies/curl.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
curl
|
||||
1
dependencies/git.dep
vendored
Normal file
1
dependencies/git.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
git
|
||||
1
dependencies/ipa-client-install.dep
vendored
Normal file
1
dependencies/ipa-client-install.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
freeipa-client
|
||||
1
dependencies/neofetch.dep
vendored
Normal file
1
dependencies/neofetch.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
neofetch
|
||||
1
dependencies/tar.dep
vendored
Normal file
1
dependencies/tar.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
tar
|
||||
1
dependencies/wget.dep
vendored
Normal file
1
dependencies/wget.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
wget
|
||||
1
dependencies/whiptail.dep
vendored
Normal file
1
dependencies/whiptail.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
whiptail
|
||||
@ -3,28 +3,70 @@ echo "Setting up template environment"
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
echo $SCRIPTDIR
|
||||
|
||||
## Folder Name of Script
|
||||
COMPLETEFOLDERPATH=$(realpath $SCRIPTDIR)
|
||||
echo $COMPLETEFOLDERPATH
|
||||
echo "Checking Dependencies"
|
||||
## Start File Loop
|
||||
## For .dependency files In The dependencies Directory
|
||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/*.dep"
|
||||
for f in $DEPENDENCIESALL
|
||||
do
|
||||
## Name Of Package
|
||||
DEPENDENCYNAME=$(echo "`basename $f | cut -f 1 -d '.'`")
|
||||
## Actual Package
|
||||
DEPENDENCYPACKAGE=`cat $f`
|
||||
echo "Checking For $DEPENDENCYNAME with package name $DEPENDENCYPACKAGE"
|
||||
|
||||
source $HOME/.bashrc
|
||||
|
||||
## Check for whiptail
|
||||
if which whiptail >/dev/null;
|
||||
if which $DEPENDENCYNAME >/dev/null;
|
||||
then
|
||||
:
|
||||
echo "$DEPENDENCYNAME Is Already Installed."
|
||||
else
|
||||
apt-get install -y whiptail
|
||||
echo "Installing $DEPENDENCYNAME"
|
||||
apt-get install -y $DEPENDENCYPACKAGE
|
||||
fi
|
||||
|
||||
## Check for git
|
||||
if which git >/dev/null;
|
||||
if which $DEPENDENCYNAME >/dev/null;
|
||||
then
|
||||
:
|
||||
else
|
||||
apt-get install -y git
|
||||
echo "Error Installing $DEPENDENCYNAME"
|
||||
fi
|
||||
## End Of loop
|
||||
done
|
||||
|
||||
topgrade_install_directory="/opt/topgrade"
|
||||
if [ ! -d "$topgrade_install_directory" ]; then
|
||||
echo "creating topgrade installation directory"
|
||||
mkdir $topgrade_install_directory
|
||||
fi
|
||||
|
||||
topgrade_binary="/opt/topgrade/topgrade"
|
||||
topgrade_git_user="r-darwish"
|
||||
topgrade_git_repo="topgrade"
|
||||
if [ ! -f "$topgrade_binary" ]; then
|
||||
echo "topgrade binary missing, installing now"
|
||||
curl -s -L "https://github.com/$topgrade_git_user/$topgrade_git_repo/releases/latest" | egrep -o '/$topgrade_git_user/$topgrade_git_repo/releases/download/[0-9]*/[0-9]*-x86_64-unknown-linux-gnu.tar.gz' | wget --base=http://github.com/ -i - -O "$topgrade_binary.tar.gz"
|
||||
fi
|
||||
|
||||
neofetch_motd="/etc/update-motd.d/01-neofetch"
|
||||
if [ ! -f "$neofetch_motd" ]; then
|
||||
echo "Installing Neofetch MOTD"
|
||||
echo "#!/bin/bash" | tee --append $neofetch_motd &>/dev/null
|
||||
echo "/usr/bin/neofetch" | tee --append $neofetch_motd &>/dev/null
|
||||
fi
|
||||
|
||||
custom_bash_aliases_path="/etc/bash_aliases"
|
||||
custom_bash_aliases_git="https://git.deathbybandaid.net/deathbybandaid/bash_aliases"
|
||||
if [ ! -d "$custom_bash_aliases_path" ]; then
|
||||
echo "Installing Bash Aliases"
|
||||
git clone --quiet $custom_bash_aliases_git $custom_bash_aliases_path
|
||||
fi
|
||||
source $HOME/.bashrc
|
||||
|
||||
custom_topgrade_confs_path="/etc/topgrade"
|
||||
custom_topgrade_confs_git="https://git.deathbybandaid.net/deathbybandaid/topgrade"
|
||||
if [ ! -d "$custom_topgrade_confs_path" ]; then
|
||||
echo "Installing topgrade configs"
|
||||
git clone --quiet $custom_topgrade_confs_git $custom_topgrade_confs_path
|
||||
fi
|
||||
|
||||
## Update
|
||||
|
||||
Loading…
Reference in New Issue
Block a user