test
This commit is contained in:
parent
917cffcf5c
commit
643860d925
9
019-Installing_Homebrew.sh
Normal file
9
019-Installing_Homebrew.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
source "$SCRIPTDIR/common/colors.sh"
|
||||
source "$SCRIPTDIR/common/functions.sh"
|
||||
source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
|
||||
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
9
019-Installing_Nix_Package_Manager
Normal file
9
019-Installing_Nix_Package_Manager
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
source "$SCRIPTDIR/common/colors.sh"
|
||||
source "$SCRIPTDIR/common/functions.sh"
|
||||
source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
|
||||
sh <(curl -L https://nixos.org/nix/install) --daemon --yes
|
||||
18
022-Fastfetch-Ubuntu_Repo.sh
Normal file
18
022-Fastfetch-Ubuntu_Repo.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
source "$SCRIPTDIR/common/colors.sh"
|
||||
source "$SCRIPTDIR/common/functions.sh"
|
||||
source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
|
||||
if [ get_distro == *"Ubuntu"* ]
|
||||
then
|
||||
ppa_added=`grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -v list.save | grep -v deb-src | grep deb | grep fastfetch | wc -l`
|
||||
if $ppa_added
|
||||
then
|
||||
echo "fastfetch ppa already installed"
|
||||
else
|
||||
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
|
||||
fi
|
||||
fi
|
||||
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
source "$SCRIPTDIR/common/colors.sh"
|
||||
source "$SCRIPTDIR/common/functions.sh"
|
||||
source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
|
||||
install_dependencies() {
|
||||
## Start File Loop
|
||||
## For .dependency files In The dependencies Directory
|
||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/package_manager/*.dep"
|
||||
for f in $DEPENDENCIESALL
|
||||
do
|
||||
|
||||
## Name Of Package
|
||||
DEPENDENCYCOMMAND=$(echo "`basename $f | cut -f 1 -d '.'`")
|
||||
|
||||
## Actual Package
|
||||
DEPENDENCYPACKAGE=`cat $f`
|
||||
|
||||
printf "$COL_LIGHT_BLUE" "* Checking For command $DEPENDENCYCOMMAND with package name $DEPENDENCYPACKAGE"
|
||||
|
||||
if is_command $DEPENDENCYCOMMAND;
|
||||
then
|
||||
printf "$COL_YELLOW" "** $DEPENDENCYCOMMAND Is Already Installed."
|
||||
|
||||
else
|
||||
printf "$COL_YELLOW" "** Installing $DEPENDENCYCOMMAND"
|
||||
pkg_mgr_install_pkg $DEPENDENCYPACKAGE
|
||||
|
||||
if is_command $DEPENDENCYCOMMAND;
|
||||
then
|
||||
printf "$COL_GREEN" "** $DEPENDENCYCOMMAND Installation Success"
|
||||
else
|
||||
printf "$COL_RED" "** Error Installing $DEPENDENCYCOMMAND"
|
||||
fi
|
||||
|
||||
fi
|
||||
## End Of loop
|
||||
done
|
||||
}
|
||||
|
||||
pkgmgr_update
|
||||
install_dependencies
|
||||
45
025-Checking_and_Installing_Dependencies_via_Homebrew.sh
Normal file
45
025-Checking_and_Installing_Dependencies_via_Homebrew.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Script Location
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
source "$SCRIPTDIR/common/colors.sh"
|
||||
source "$SCRIPTDIR/common/functions.sh"
|
||||
source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
|
||||
install_dependencies() {
|
||||
## Start File Loop
|
||||
## For .dependency files In The dependencies Directory
|
||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/homebrew/*.dep"
|
||||
for f in $DEPENDENCIESALL
|
||||
do
|
||||
|
||||
## Name Of Package
|
||||
DEPENDENCYCOMMAND=$(echo "`basename $f | cut -f 1 -d '.'`")
|
||||
|
||||
## Actual Package
|
||||
DEPENDENCYPACKAGE=`cat $f`
|
||||
|
||||
printf "$COL_LIGHT_BLUE" "* Checking For command $DEPENDENCYCOMMAND with package name $DEPENDENCYPACKAGE"
|
||||
|
||||
if is_command $DEPENDENCYCOMMAND;
|
||||
then
|
||||
printf "$COL_YELLOW" "** $DEPENDENCYCOMMAND Is Already Installed."
|
||||
|
||||
else
|
||||
printf "$COL_YELLOW" "** Installing $DEPENDENCYCOMMAND"
|
||||
yes | brew install $DEPENDENCYPACKAGE
|
||||
|
||||
if is_command $DEPENDENCYCOMMAND;
|
||||
then
|
||||
printf "$COL_GREEN" "** $DEPENDENCYCOMMAND Installation Success"
|
||||
else
|
||||
printf "$COL_RED" "** Error Installing $DEPENDENCYCOMMAND"
|
||||
fi
|
||||
|
||||
fi
|
||||
## End Of loop
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
install_dependencies
|
||||
@ -9,7 +9,7 @@ source "$SCRIPTDIR/common/load-defaults.sh"
|
||||
install_dependencies() {
|
||||
## Start File Loop
|
||||
## For .dependency files In The dependencies Directory
|
||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/*.dep"
|
||||
DEPENDENCIESALL="$SCRIPTDIR/dependencies/homebrew/*.dep"
|
||||
for f in $DEPENDENCIESALL
|
||||
do
|
||||
|
||||
@ -27,7 +27,7 @@ install_dependencies() {
|
||||
|
||||
else
|
||||
printf "$COL_YELLOW" "** Installing $DEPENDENCYCOMMAND"
|
||||
install_pkg $DEPENDENCYPACKAGE
|
||||
nix-env -iA $DEPENDENCYPACKAGE
|
||||
|
||||
if is_command $DEPENDENCYCOMMAND;
|
||||
then
|
||||
@ -41,5 +41,5 @@ install_dependencies() {
|
||||
done
|
||||
}
|
||||
|
||||
pkgmgr_update
|
||||
|
||||
install_dependencies
|
||||
@ -36,6 +36,10 @@ should_apt_last_update() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_distro() {
|
||||
echo $(awk -F= '/^NAME/{print $2}' /etc/os-release)
|
||||
}
|
||||
|
||||
get_pkg_mgr() {
|
||||
if is_command apt ; then
|
||||
echo "apt"
|
||||
@ -127,8 +131,7 @@ pkgmgr_clean(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
install_pkg() {
|
||||
pkg_mgr_install_pkg() {
|
||||
|
||||
# package to install
|
||||
local pkg_to_install="$1"
|
||||
|
||||
1
dependencies/package_manager/fastfetch.dep
vendored
Normal file
1
dependencies/package_manager/fastfetch.dep
vendored
Normal file
@ -0,0 +1 @@
|
||||
fastfetch
|
||||
@ -49,7 +49,7 @@ get_pkg_mgr() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_pkg() {
|
||||
pkg_mgr_install_pkg() {
|
||||
|
||||
# package to install
|
||||
local pkg_to_install="$1"
|
||||
@ -76,7 +76,7 @@ then
|
||||
printf "$COL_YELLOW" "* git Is Already Installed."
|
||||
else
|
||||
printf "$COL_YELLOW" "* Installing git"
|
||||
install_pkg git
|
||||
pkg_mgr_install_pkg git
|
||||
fi
|
||||
|
||||
printf "$COL_LIGHT_BLUE" "Checking for installation script"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user