Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Sep 20, 2024
1 parent f46d313 commit d6526cf
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 54 deletions.
16 changes: 8 additions & 8 deletions core/tabs/applications-setup/browser-setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
. ../common-script.sh

install_chrome() {
printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}."
if ! command_exists google-chrome; then
printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Expand Down Expand Up @@ -33,8 +33,8 @@ install_chrome() {
}

install_thorium() {
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
if ! command_exists thorium-browser; then
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list
Expand All @@ -61,8 +61,8 @@ install_thorium() {
}

install_firefox() {
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
Expand All @@ -86,8 +86,8 @@ install_firefox() {
}

install_librewolf() {
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
if ! command_exists librewolf; then
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates
Expand Down Expand Up @@ -128,8 +128,8 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
}

install_brave() {
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
if ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
Expand Down Expand Up @@ -177,8 +177,8 @@ install_vivaldi() {
}

install_chromium() {
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
if ! command_exists chromium; then
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
case "$PACKAGER" in
apt-get|nala|zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
Expand All @@ -200,8 +200,8 @@ install_chromium() {
}

install_lynx() {
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
if ! command_exists lynx; then
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx
Expand Down Expand Up @@ -229,7 +229,7 @@ browserSetup() {
printf "%b\n" "7. Thorium"
printf "%b\n" "8. Lynx"
printf "%b\n" "----------------------------"
printf "%b\n" "Enter your choices (e.g., 1 3 5): "
printf "%b" "Enter your choices (e.g., 1 3 5): "
read -r choice
for ch in $choice; do
case $ch in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ choose_installation() {
printf "%b\n" "1. ${YELLOW}Docker${RC}"
printf "%b\n" "2. ${YELLOW}Docker Compose${RC}"
printf "%b\n" "3. ${YELLOW}Both${RC}"
printf "Enter your choice [1-3]: "
printf "%b" "Enter your choice [1-3]: "
read -r CHOICE

case "$CHOICE" in
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/linutil-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ installLinutil() {
checkEnv
checkEscalationTool
checkAURHelper
installLinutil
installLinutil
21 changes: 11 additions & 10 deletions core/tabs/applications-setup/office-suite-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
. ../common-script.sh

install_onlyoffice() {
printf "%b\n" "${YELLOW}Installing Only Office..${RC}."
if ! command_exists onlyoffice-desktopeditors; then
printf "%b\n" "${YELLOW}Installing Only Office..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb
Expand All @@ -27,8 +27,8 @@ install_onlyoffice() {
}

install_libreoffice() {
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
if ! command_exists libreoffice; then
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core
Expand All @@ -51,8 +51,8 @@ install_libreoffice() {
}

install_wpsoffice() {
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
if ! command_exists com.wps.Office; then
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --noconfirm wps-office
Expand All @@ -69,8 +69,9 @@ install_wpsoffice() {

# needs to be updated every year for latest version
install_freeoffice() {
printf "%b\n" "${YELLOW}Installing Free Office...${RC}"
case "$PACKAGER" in
if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then
printf "%b\n" "${YELLOW}Installing Free Office...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb
"$ESCALATION_TOOL" dpkg -i softmaker-freeoffice-2024_1218-01_amd64.deb
Expand All @@ -95,8 +96,8 @@ install_freeoffice() {
}

install_evince() {
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
if ! command_exists evince; then
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm evince
Expand All @@ -111,8 +112,8 @@ install_evince() {
}

install_okular() {
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
if ! command_exists okular; then
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm okular
Expand All @@ -127,8 +128,8 @@ install_okular() {
}

install_pdfstudioviewer() {
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
if ! command_exists pdfstudioviewer2024/pdfstudioviewer2024; then
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
curl -O https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.sh
"$ESCALATION_TOOL" chmod +x PDFStudioViewer_linux64.sh
if sh PDFStudioViewer_linux64.sh; then
Expand All @@ -143,8 +144,8 @@ install_pdfstudioviewer() {
}

install_pdfstudio() {
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
if ! command_exists pdfstudio2024/pdfstudio2024; then
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
curl -O https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh
"$ESCALATION_TOOL" chmod +x PDFStudio_linux64.sh
if sh PDFStudio_linux64.sh; then
Expand Down Expand Up @@ -175,7 +176,7 @@ officeSuiteSetup() {
printf "%b\n" "7. PDF Studio Viewer"
printf "%b\n" "8. PDF Studio (Paid Software)"
printf "%b\n" "----------------------------"
printf "%b\n" "Enter your choices (e.g., 1 3 5): "
printf "%b" "Enter your choices (e.g., 1 3 5): "
read -r choice
for ch in $choice; do
case $ch in
Expand Down
26 changes: 5 additions & 21 deletions core/tabs/applications-setup/setup-flatpak.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,16 @@ setup_flatpak() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm flatpak
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak # Fedora should have flatpak already installed, this is just a failsafe
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
yum)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" install -S flatpak
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
exit 1
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
esac
printf "%b\n" "Adding Flathub remote..."
"$ESCALATION_TOOL" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
else
if command -v flatpak >/dev/null 2>&1; then
if command_exists flatpak; then
if ! flatpak remotes | grep -q "flathub"; then
printf "%b\n" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (y/n)${RC}"
printf "%b" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (Y/n): ${RC}"
read -r add_remote
case "$add_remote" in
[Yy]*)
Expand All @@ -70,14 +54,14 @@ setup_flatpak() {
# Only used for Ubuntu GNOME. Ubuntu GNOME doesnt allow flathub to be added as a remote to their store.
# So in case the user wants to use a GUI siftware manager they can setup it here
if [ "$DE" = "GNOME" ]; then
printf "%b\n" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (y/n)${RC}"
printf "%b" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (Y/n): ${RC}"
read -r install_gnome
if [ "$install_gnome" = "y" ] || [ "$install_gnome" = "Y" ]; then
"$ESCALATION_TOOL" "$PACKAGER" install -y gnome-software-plugin-flatpak
fi
# Useful for Debian KDE spin as well
elif [ "$DE" = "KDE" ]; then
printf "%b\n" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (y/n)${RC}"
printf "%b" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (Y/n): ${RC}"
read -r install_kde
if [ "$install_kde" = "y" ] || [ "$install_kde" = "Y" ]; then
"$ESCALATION_TOOL" "$PACKAGER" install -y plasma-discover-backend-flatpak
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/system-setup/system-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ common_cleanup() {
}

clean_data() {
printf "%b\n" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}"
printf "%b" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}"
read -r clean_response
case $clean_response in
y|Y)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ setup_samba() {

if [ -f "$SAMBA_CONFIG" ]; then
printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}"
printf "Do you want to modify the existing Samba configuration? (yes/no): "
printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): "
read -r MODIFY_SAMBA
if [ "$MODIFY_SAMBA" = "yes" ]; then
"$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG"
Expand All @@ -77,7 +77,7 @@ setup_samba() {
printf "%b\n" "${YELLOW}No existing Samba configuration found. Setting up a new one...${RC}"

# Prompt user for shared directory path
printf "Enter the path for the Samba share (default: /srv/samba/share): "
printf "%b" "Enter the path for the Samba share (default: /srv/samba/share): "
read -r SHARED_DIR
SHARED_DIR=${SHARED_DIR:-/srv/samba/share}

Expand All @@ -86,7 +86,7 @@ setup_samba() {
"$ESCALATION_TOOL" chmod -R 0777 "$SHARED_DIR"

# Add a new Samba user
printf "Enter Samba username: "
printf "%b" "Enter Samba username: "
read -r SAMBA_USER

# Loop until the passwords match
Expand Down Expand Up @@ -163,14 +163,14 @@ setup_ssh_samba(){
clear

# Display menu
printf "Select an option:\n"
printf "1. Setup SSH\n"
printf "2. Setup Samba\n"
printf "3. Configure Firewall\n"
printf "4. Setup All\n"
printf "5. Exit\n"

printf "Enter your choice [1-5]: "
printf "%b\n" "Select an option:"
printf "%b\n" "1. Setup SSH"
printf "%b\n" "2. Setup Samba"
printf "%b\n" "3. Configure Firewall"
printf "%b\n" "4. Setup All"
printf "%b\n" "5. Exit"

printf "%b" "Enter your choice [1-5]: "
read CHOICE

case "$CHOICE" in
Expand Down Expand Up @@ -203,4 +203,4 @@ setup_ssh_samba(){

checkEnv
checkEscalationTool
setup_ssh_samba
setup_ssh_samba

0 comments on commit d6526cf

Please sign in to comment.