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
|
## Script Location
|
||||||
SCRIPTDIR=$(dirname $0)
|
SCRIPTDIR=$(dirname $0)
|
||||||
echo $SCRIPTDIR
|
|
||||||
|
|
||||||
## Folder Name of Script
|
echo "Checking Dependencies"
|
||||||
COMPLETEFOLDERPATH=$(realpath $SCRIPTDIR)
|
## Start File Loop
|
||||||
echo $COMPLETEFOLDERPATH
|
## 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
|
if which $DEPENDENCYNAME >/dev/null;
|
||||||
|
then
|
||||||
|
echo "$DEPENDENCYNAME Is Already Installed."
|
||||||
|
else
|
||||||
|
echo "Installing $DEPENDENCYNAME"
|
||||||
|
apt-get install -y $DEPENDENCYPACKAGE
|
||||||
|
fi
|
||||||
|
|
||||||
## Check for whiptail
|
if which $DEPENDENCYNAME >/dev/null;
|
||||||
if which whiptail >/dev/null;
|
then
|
||||||
then
|
:
|
||||||
:
|
else
|
||||||
else
|
echo "Error Installing $DEPENDENCYNAME"
|
||||||
apt-get install -y whiptail
|
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
|
fi
|
||||||
|
|
||||||
## Check for git
|
topgrade_binary="/opt/topgrade/topgrade"
|
||||||
if which git >/dev/null;
|
topgrade_git_user="r-darwish"
|
||||||
then
|
topgrade_git_repo="topgrade"
|
||||||
:
|
if [ ! -f "$topgrade_binary" ]; then
|
||||||
else
|
echo "topgrade binary missing, installing now"
|
||||||
apt-get install -y git
|
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
|
fi
|
||||||
|
|
||||||
## Update
|
## Update
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user