chagned paru build location, removed remove_essentials, added internet connection check, added exit 0 just in case
This commit is contained in:
parent
293e4dc117
commit
5cb97d0fee
1 changed files with 19 additions and 16 deletions
35
setup.sh
35
setup.sh
|
@ -48,6 +48,14 @@ title() {
|
||||||
echo -e "$BOLD$GREEN====================[ $* ]====================$RESET"
|
echo -e "$BOLD$GREEN====================[ $* ]====================$RESET"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
smart_mkdir() {
|
||||||
|
# make directory recursively if it doesn't exist already
|
||||||
|
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
package_install() {
|
package_install() {
|
||||||
paru -S --noconfirm "$@"
|
paru -S --noconfirm "$@"
|
||||||
}
|
}
|
||||||
|
@ -66,11 +74,11 @@ backup() {
|
||||||
install_paru() {
|
install_paru() {
|
||||||
log "installing paru"
|
log "installing paru"
|
||||||
|
|
||||||
cd /tmp || (error "failed to move to /tmp for paru installation" && exit 1)
|
smart_mkdir "$SCRIPT_DIR/tmp"
|
||||||
|
cd "$SCRIPT_DIR/tmp" || (error "failed to move to $SCRIPT_DIR/tmp for paru installation" && exit 1)
|
||||||
sudo pacman --noconfirm -S --needed base-devel git
|
sudo pacman --noconfirm -S --needed base-devel git
|
||||||
git clone https://aur.archlinux.org/paru.git
|
git clone https://aur.archlinux.org/paru.git
|
||||||
cd ./paru && makepkg -si
|
cd ./paru && makepkg -si
|
||||||
cd .. && rm -rf ./paru
|
|
||||||
|
|
||||||
cd "$SCRIPT_DIR" || (error "failed to come back to working directory after installing paru" && exit 1)
|
cd "$SCRIPT_DIR" || (error "failed to come back to working directory after installing paru" && exit 1)
|
||||||
}
|
}
|
||||||
|
@ -85,18 +93,6 @@ setup_essentials() {
|
||||||
# enable multilib, color, parallel download, and total download in /etc/pacman.conf
|
# enable multilib, color, parallel download, and total download in /etc/pacman.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_essentials() {
|
|
||||||
package_remove \
|
|
||||||
epiphany \
|
|
||||||
totem \
|
|
||||||
kvantum-qt5 \
|
|
||||||
gnome-firmware \
|
|
||||||
gnome-color-manager \
|
|
||||||
manjaro-hello \
|
|
||||||
gnome-layout-switcher \
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# #################### [ DEFINING SETUP ] ####################
|
# #################### [ DEFINING SETUP ] ####################
|
||||||
# Define instructions on how to setup applications & stuff
|
# Define instructions on how to setup applications & stuff
|
||||||
|
@ -628,6 +624,13 @@ if [[ ! $EUID -ne 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check internet connection
|
||||||
|
if ! ping -c 1 archlinux.org &> /dev/null; then
|
||||||
|
error "You are not connected to the internet"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
|
||||||
# check partition
|
# check partition
|
||||||
|
|
||||||
# check if $RESET$BOLD/media/pomp/data$GREEN exists in fstab and is mounted
|
# check if $RESET$BOLD/media/pomp/data$GREEN exists in fstab and is mounted
|
||||||
|
@ -701,8 +704,6 @@ choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||||
clear
|
clear
|
||||||
for choice in $choices; do
|
for choice in $choices; do
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
"remove_unnecessary_packages")
|
|
||||||
remove_essentials;;
|
|
||||||
"4k_video_downloader")
|
"4k_video_downloader")
|
||||||
setup_4kvideodownloader;;
|
setup_4kvideodownloader;;
|
||||||
"brave")
|
"brave")
|
||||||
|
@ -782,3 +783,5 @@ if [ ! ${#POST_INSTALL[@]} -eq 0 ]; then
|
||||||
log_no_label " - $doWhat"
|
log_no_label " - $doWhat"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue