Upload files

Signed-off-by: Stefano Capitani's avatarSte74 <stefano@manjaro.org>
parent f638b66b
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#set -x
packages=` cat .packages.txt `
echo $packages
# updating databases and writing results to a file
pacman -Syy | tee .pacmanstatus.txt | zenity --progress --title="Manjaro Linux Software Tool" --no-cancel --pulsate --text "Updating Package Database..." --width=500 --auto-close
pstatus=` cat .pacmanstatus.txt `
# checking for other running package managers
if [[ $(cat .pacmanstatus.txt | grep -i 'core.db') = "" ]]
then # giving choice to user to kill other process or wait
ans=$(zenity --list --title="Manjaro Linux Software Tool" --radiolist --text "Another package manager is running.\nIf you are updating the system\nyou may want to finish updates before continuing\nto avoid problems. If not, it is safe to kill the other process.\nWhat would you like to do?" --column Select --column Choice TRUE "Kill other process and continue" FALSE "Wait to finish updating" --height=300)
# killing pamac and unlocking db
if [ "$ans" = "Kill other process and continue" ]
then
killall pamac-updater
killall pamac-manager
rm /var/lib/pacman/db.lck
pacman -Syy | zenity --progress --title="Manjaro Linux Software Tool" --no-cancel --pulsate --text "Updating Package Database..." --width=500 --auto-close
else # exiting according to user choice
exit
fi
fi
# Installing packages
pacman -S --noconfirm $packages | zenity --progress --title="Manjaro Linux Software Tool" --no-cancel --pulsate --text "Installing Packages..." --width=500 --auto-close
# Letting user know that packages have been installed
zenity --info --text="Your Packages Have Been Installed Successfully"
# removing files no longer needed
if [[ -f .packages.txt ]]; then
rm .packages.txt
fi
if [[ -f .pacmanstatus.txt ]]; then
rm .pacmanstatus.txt
fi
if [[ -f /var/lib/pacman/db.lck ]]; then
rm /var/lib/pacman/db.lck
fi
This diff is collapsed.
[Desktop Entry]
Version=1.0
Type=Application
Name=Manjaro Software Tool
Comment=Software Installation Tool for Manjaro
Categories=Utility;
Exec=manjaro-software-install-tool.py
Icon=system-software-install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment