mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-02-22 08:59:13 +00:00
fix conficts
This commit is contained in:
parent
691e2771a1
commit
7d60cf2a6a
15
Cargo.lock
generated
15
Cargo.lock
generated
|
@ -438,7 +438,6 @@ dependencies = [
|
||||||
"crossterm",
|
"crossterm",
|
||||||
"ego-tree",
|
"ego-tree",
|
||||||
"linutil_core",
|
"linutil_core",
|
||||||
"nix 0.29.0",
|
|
||||||
"oneshot",
|
"oneshot",
|
||||||
"portable-pty",
|
"portable-pty",
|
||||||
"rand",
|
"rand",
|
||||||
|
@ -530,18 +529,6 @@ dependencies = [
|
||||||
"pin-utils",
|
"pin-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nix"
|
|
||||||
version = "0.29.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.6.0",
|
|
||||||
"cfg-if",
|
|
||||||
"cfg_aliases",
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nom"
|
name = "nom"
|
||||||
version = "7.1.3"
|
version = "7.1.3"
|
||||||
|
@ -612,7 +599,7 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"nix 0.25.1",
|
"nix",
|
||||||
"serial",
|
"serial",
|
||||||
"shared_library",
|
"shared_library",
|
||||||
"shell-words",
|
"shell-words",
|
||||||
|
|
|
@ -27,10 +27,10 @@ install_docker() {
|
||||||
curl -fsSL https://get.docker.com | sh
|
curl -fsSL https://get.docker.com | sh
|
||||||
;;
|
;;
|
||||||
dnf)
|
dnf)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
|
elevated_execution "$PACKAGER" -y install dnf-plugins-core
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
elevated_execution "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
elevated_execution "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
||||||
"$ESCALATION_TOOL" systemctl enable --now docker
|
elevated_execution systemctl enable --now docker
|
||||||
;;
|
;;
|
||||||
zypper)
|
zypper)
|
||||||
elevated_execution "$PACKAGER" --non-interactive install docker
|
elevated_execution "$PACKAGER" --non-interactive install docker
|
||||||
|
@ -56,9 +56,9 @@ install_docker_compose() {
|
||||||
elevated_execution "$PACKAGER" install -y docker-compose-plugin
|
elevated_execution "$PACKAGER" install -y docker-compose-plugin
|
||||||
;;
|
;;
|
||||||
dnf)
|
dnf)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
|
elevated_execution "$PACKAGER" -y install dnf-plugins-core
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
elevated_execution "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin
|
elevated_execution "$PACKAGER" install -y docker-compose-plugin
|
||||||
;;
|
;;
|
||||||
zypper)
|
zypper)
|
||||||
elevated_execution "$PACKAGER" --non-interactive install docker-compose
|
elevated_execution "$PACKAGER" --non-interactive install docker-compose
|
||||||
|
|
|
@ -63,11 +63,11 @@ installLinutil() {
|
||||||
|
|
||||||
installExtra() {
|
installExtra() {
|
||||||
printf "%b\n" "${YELLOW}Installing the manpage...${RC}"
|
printf "%b\n" "${YELLOW}Installing the manpage...${RC}"
|
||||||
"$ESCALATION_TOOL" mkdir -p /usr/share/man/man1
|
elevated_execution mkdir -p /usr/share/man/man1
|
||||||
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/man/linutil.1' | "$ESCALATION_TOOL" tee '/usr/share/man/man1/linutil.1' > /dev/null
|
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/man/linutil.1' | elevated_execution tee '/usr/share/man/man1/linutil.1' > /dev/null
|
||||||
printf "%b\n" "${YELLOW}Creating a Desktop Entry...${RC}"
|
printf "%b\n" "${YELLOW}Creating a Desktop Entry...${RC}"
|
||||||
"$ESCALATION_TOOL" mkdir -p /usr/share/applications
|
elevated_execution mkdir -p /usr/share/applications
|
||||||
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/linutil.desktop' | "$ESCALATION_TOOL" tee /usr/share/applications/linutil.desktop > /dev/null
|
curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/linutil.desktop' | elevated_execution tee /usr/share/applications/linutil.desktop > /dev/null
|
||||||
printf "%b\n" "${GREEN}Done.${RC}"
|
printf "%b\n" "${GREEN}Done.${RC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@ checkAURHelper() {
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}"
|
printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}"
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git
|
elevated_execution "$PACKAGER" -S --needed --noconfirm base-devel git
|
||||||
cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-bin.git && "$ESCALATION_TOOL" chown -R "$USER":"$USER" ./yay-bin
|
cd /opt && elevated_execution git clone https://aur.archlinux.org/yay-bin.git && elevated_execution chown -R "$USER":"$USER" ./yay-bin
|
||||||
cd yay-bin && makepkg --noconfirm -si
|
cd yay-bin && makepkg --noconfirm -si
|
||||||
|
|
||||||
if command_exists yay; then
|
if command_exists yay; then
|
||||||
|
|
|
@ -17,12 +17,12 @@ update() {
|
||||||
y|Y)
|
y|Y)
|
||||||
printf "%b\n" "${CYAN}Preparing to update to $next_version...${RC}"
|
printf "%b\n" "${CYAN}Preparing to update to $next_version...${RC}"
|
||||||
|
|
||||||
if ! "$ESCALATION_TOOL" "$PACKAGER" install dnf-plugin-system-upgrade -y; then
|
if ! elevated_execution "$PACKAGER" install dnf-plugin-system-upgrade -y; then
|
||||||
printf "%b\n" "${RED}Failed to install dnf-plugin-system-upgrade.${RC}"
|
printf "%b\n" "${RED}Failed to install dnf-plugin-system-upgrade.${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! "$ESCALATION_TOOL" "$PACKAGER" system-upgrade download --releasever="$next_version" -y ; then
|
if ! elevated_execution "$PACKAGER" system-upgrade download --releasever="$next_version" -y ; then
|
||||||
printf "%b\n" "${RED}Failed to download the upgrade packages.${RC}"
|
printf "%b\n" "${RED}Failed to download the upgrade packages.${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -33,7 +33,7 @@ update() {
|
||||||
case "$reboot_response" in
|
case "$reboot_response" in
|
||||||
y|Y)
|
y|Y)
|
||||||
printf "%b\n" "${YELLOW}Rebooting to apply the upgrade...${RC}"
|
printf "%b\n" "${YELLOW}Rebooting to apply the upgrade...${RC}"
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" system-upgrade reboot
|
elevated_execution "$PACKAGER" system-upgrade reboot
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "%b\n" "${YELLOW}You can reboot later to apply the upgrade.${RC}"
|
printf "%b\n" "${YELLOW}You can reboot later to apply the upgrade.${RC}"
|
||||||
|
@ -51,8 +51,8 @@ post_upgrade() {
|
||||||
|
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
dnf)
|
dnf)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" autoremove
|
elevated_execution "$PACKAGER" autoremove
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" distro-sync -y
|
elevated_execution "$PACKAGER" distro-sync -y
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER.${RC}"
|
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER.${RC}"
|
||||||
|
|
|
@ -18,11 +18,11 @@ installDependencies() {
|
||||||
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
|
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
|
||||||
case "${PACKAGER}" in
|
case "${PACKAGER}" in
|
||||||
apt-get|nala)
|
apt-get|nala)
|
||||||
"${ESCALATION_TOOL}" "${PACKAGER}" install -y xz-utils gzip bzip2 jq;;
|
elevated_execution "${PACKAGER}" install -y xz-utils gzip bzip2 jq;;
|
||||||
dnf|zypper)
|
dnf|zypper)
|
||||||
"${ESCALATION_TOOL}" "${PACKAGER}" install -y ${DEPENDENCIES};;
|
elevated_execution "${PACKAGER}" install -y ${DEPENDENCIES};;
|
||||||
pacman)
|
pacman)
|
||||||
"${ESCALATION_TOOL}" "${PACKAGER}" -S --noconfirm --needed ${DEPENDENCIES};;
|
elevated_execution "${PACKAGER}" -S --noconfirm --needed ${DEPENDENCIES};;
|
||||||
*)
|
*)
|
||||||
printf "%b\n" "${RED}Unsupported package manager.${RC}"
|
printf "%b\n" "${RED}Unsupported package manager.${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -17,7 +17,7 @@ deleteUser() {
|
||||||
read -r confirm
|
read -r confirm
|
||||||
confirmAction || exit 1
|
confirmAction || exit 1
|
||||||
|
|
||||||
$ESCALATION_TOOL userdel --remove "$username" 2>/dev/null
|
elevated_execution userdel --remove "$username" 2>/dev/null
|
||||||
printf "%b\n" "${GREEN}User $username deleted successfully${RC}"
|
printf "%b\n" "${GREEN}User $username deleted successfully${RC}"
|
||||||
else
|
else
|
||||||
printf "%b\n" "${RED}User $username does not exist.${RC}"
|
printf "%b\n" "${RED}User $username does not exist.${RC}"
|
||||||
|
|
|
@ -37,7 +37,7 @@ removeFromGroup() {
|
||||||
read -r confirm
|
read -r confirm
|
||||||
confirmAction || exit 1
|
confirmAction || exit 1
|
||||||
|
|
||||||
$ESCALATION_TOOL usermod -rG $groups_to_remove "$username"
|
elevated_execution usermod -rG $groups_to_remove "$username"
|
||||||
|
|
||||||
printf "%b\n" "${GREEN}User successfully removed from $groups_to_remove${RC}"
|
printf "%b\n" "${GREEN}User successfully removed from $groups_to_remove${RC}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user