fix conficts

This commit is contained in:
JEEVITHA KANNAN K S 2024-11-01 23:01:37 +05:30
parent 691e2771a1
commit 7d60cf2a6a
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333
8 changed files with 25 additions and 38 deletions

17
Cargo.lock generated
View File

@ -438,7 +438,6 @@ dependencies = [
"crossterm",
"ego-tree",
"linutil_core",
"nix 0.29.0",
"oneshot",
"portable-pty",
"rand",
@ -530,18 +529,6 @@ dependencies = [
"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]]
name = "nom"
version = "7.1.3"
@ -612,7 +599,7 @@ dependencies = [
"lazy_static",
"libc",
"log",
"nix 0.25.1",
"nix",
"serial",
"shared_library",
"shell-words",
@ -1327,4 +1314,4 @@ dependencies = [
"proc-macro2",
"quote",
"syn",
]
]

View File

@ -27,10 +27,10 @@ install_docker() {
curl -fsSL https://get.docker.com | sh
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
"$ESCALATION_TOOL" "$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
"$ESCALATION_TOOL" systemctl enable --now docker
elevated_execution "$PACKAGER" -y install dnf-plugins-core
elevated_execution "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
elevated_execution "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
elevated_execution systemctl enable --now docker
;;
zypper)
elevated_execution "$PACKAGER" --non-interactive install docker
@ -56,9 +56,9 @@ install_docker_compose() {
elevated_execution "$PACKAGER" install -y docker-compose-plugin
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
"$ESCALATION_TOOL" "$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" -y install dnf-plugins-core
elevated_execution "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
elevated_execution "$PACKAGER" install -y docker-compose-plugin
;;
zypper)
elevated_execution "$PACKAGER" --non-interactive install docker-compose

View File

@ -63,11 +63,11 @@ installLinutil() {
installExtra() {
printf "%b\n" "${YELLOW}Installing the manpage...${RC}"
"$ESCALATION_TOOL" 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
elevated_execution mkdir -p /usr/share/man/man1
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}"
"$ESCALATION_TOOL" 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
elevated_execution mkdir -p /usr/share/applications
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}"
}

View File

@ -38,8 +38,8 @@ checkAURHelper() {
done
printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}"
"$ESCALATION_TOOL" "$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
elevated_execution "$PACKAGER" -S --needed --noconfirm base-devel git
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
if command_exists yay; then

View File

@ -17,12 +17,12 @@ update() {
y|Y)
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}"
exit 1
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}"
exit 1
fi
@ -33,7 +33,7 @@ update() {
case "$reboot_response" in
y|Y)
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}"
@ -51,8 +51,8 @@ post_upgrade() {
case "$PACKAGER" in
dnf)
"$ESCALATION_TOOL" "$PACKAGER" autoremove
"$ESCALATION_TOOL" "$PACKAGER" distro-sync -y
elevated_execution "$PACKAGER" autoremove
elevated_execution "$PACKAGER" distro-sync -y
;;
*)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER.${RC}"

View File

@ -18,11 +18,11 @@ installDependencies() {
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
case "${PACKAGER}" in
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)
"${ESCALATION_TOOL}" "${PACKAGER}" install -y ${DEPENDENCIES};;
elevated_execution "${PACKAGER}" install -y ${DEPENDENCIES};;
pacman)
"${ESCALATION_TOOL}" "${PACKAGER}" -S --noconfirm --needed ${DEPENDENCIES};;
elevated_execution "${PACKAGER}" -S --noconfirm --needed ${DEPENDENCIES};;
*)
printf "%b\n" "${RED}Unsupported package manager.${RC}"
exit 1

View File

@ -17,7 +17,7 @@ deleteUser() {
read -r confirm
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}"
else
printf "%b\n" "${RED}User $username does not exist.${RC}"

View File

@ -37,7 +37,7 @@ removeFromGroup() {
read -r confirm
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}"
}