-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/ChrisTitusTech/linutil
- Loading branch information
Showing
84 changed files
with
551 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/sh -e | ||
|
||
. ../common-script.sh | ||
|
||
installLinutil() { | ||
printf "%b\n" "${YELLOW}Installing Linutil...${RC}" | ||
case "$PACKAGER" in | ||
pacman) | ||
printf "%b\n" "-----------------------------------------------------" | ||
printf "%b\n" "Select the package to install:" | ||
printf "%b\n" "1. ${CYAN}linutil${RC} (stable release compiled from source)" | ||
printf "%b\n" "2. ${CYAN}linutil-bin${RC} (stable release pre-compiled)" | ||
printf "%b\n" "3. ${CYAN}linutil-git${RC} (compiled from the latest commit)" | ||
printf "%b\n" "-----------------------------------------------------" | ||
printf "%b" "Enter your choice: " | ||
read -r choice | ||
case $choice in | ||
1) "$AUR_HELPER" -S --noconfirm linutil ;; | ||
2) "$AUR_HELPER" -S --noconfirm linutil-bin ;; | ||
3) "$AUR_HELPER" -S --noconfirm linutil-git ;; | ||
*) | ||
printf "%b\n" "${RED}Invalid choice:${RC} $choice" | ||
exit 1 | ||
;; | ||
esac | ||
printf "%b\n" "${GREEN}Installed successfully.${RC}" | ||
;; | ||
*) | ||
printf "%b\n" "${RED}There are no official packages for your distro.${RC}" | ||
printf "%b" "${YELLOW}Do you want to install the crates.io package? (y/N) ${RC}" | ||
read -r choice | ||
case $choice in | ||
y|Y) | ||
if ! command_exists cargo; then | ||
printf "%b\n" "${YELLOW}Installing rustup...${RC}" | ||
case "$PACKAGER" in | ||
pacman) | ||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rustup | ||
;; | ||
zypper) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -n curl gcc make | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
. $HOME/.cargo/env | ||
;; | ||
*) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y rustup | ||
;; | ||
esac | ||
fi | ||
rustup default stable | ||
cargo install --force linutil_tui | ||
printf "%b\n" "${GREEN}Installed successfully.${RC}" | ||
;; | ||
*) printf "%b\n" "${RED}Linutil not installed.${RC}" ;; | ||
esac | ||
esac | ||
} | ||
|
||
checkEnv | ||
checkEscalationTool | ||
checkAURHelper | ||
installLinutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh -e | ||
|
||
. ../common-script.sh | ||
|
||
updateLinutil() { | ||
if [ ! -e "$HOME/.cargo/bin/linutil" ]; then | ||
printf "%b\n" "${RED}This script only updates the binary installed through cargo.\nlinutil_tui is not installed.${RC}" | ||
exit 1 | ||
fi | ||
|
||
if ! command_exists cargo; then | ||
printf "%b\n" "${YELLOW}Installing rustup...${RC}" | ||
case "$PACKAGER" in | ||
pacman) | ||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rustup | ||
;; | ||
zypper) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -n curl gcc make | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
. $HOME/.cargo/env | ||
;; | ||
*) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y rustup | ||
;; | ||
esac | ||
fi | ||
|
||
INSTALLED_VERSION=$(cargo install --list | grep "linutil_tui" | awk '{print $2}' | tr -d 'v:') | ||
LATEST_VERSION=$(curl -s https://crates.io/api/v1/crates/linutil_tui | grep -oP '"max_version":\s*"\K[^"]+') | ||
|
||
if [ "$INSTALLED_VERSION" = "$LATEST_VERSION" ]; then | ||
printf "%b\n" "${GREEN}linutil_tui is up to date.${RC}" | ||
exit 0 | ||
fi | ||
|
||
printf "%b\n" "${YELLOW}Updating linutil_tui...${RC}" | ||
rustup default stable | ||
cargo install --force linutil_tui | ||
printf "%b\n" "${GREEN}Updated successfully.${RC}" | ||
} | ||
|
||
checkEnv | ||
checkEscalationTool | ||
checkAURHelper | ||
updateLinutil |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
tabs/system-setup/grub-theme.sh → core/tabs/system-setup/grub-theme.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
. ../common-script.sh | ||
|
||
themeinstall(){ | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.