Skip to content

Commit

Permalink
Update cydramanager
Browse files Browse the repository at this point in the history
  • Loading branch information
acth2 authored Jun 10, 2024
1 parent 6436eb2 commit 0461b02
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions testing/packagemanagers/software/cydramanager
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PRINT_LOG=true
REGISTER_VAR=true
SHOW_HELP=false
PRINT_MIRROR=false
VERBOSE=false
WASH_CACHE=true
INSTALL_PACMAN=false
UPDATE_DB=true
Expand Down Expand Up @@ -81,10 +82,16 @@ for arg in "$@"; do
;;
--filter-result)
FILTER=RESULT=true
--verbose
VERBOSE=true
;;
esac
done

if [ "$VERBOSE" = true ]; then
set -x
fi

if [[ $EUID -ne 0 ]]; then
if [ "$PRINT_LOG" = true ]; then
echo -e "${RED}Ce script doit etre exécuté avec les privilèges root${NC}"
Expand Down Expand Up @@ -112,8 +119,9 @@ function open_help {
echo "Cydramanager - Gestionnaire de paquets simple pour CydraOS"
echo "Utilisation: cydramanager [install/remove/...] [nom_du_paquet] [arguments]"
echo
echo "Options: Arguments:"
echo " changever Permet de changé la version d'un packet --add-as-depends Le gdp interpretera le packet comme étant une dependance"
echo "Options: Arguments:"
echo " changever Permet de changé la version d'un packet --add-as-depends Le gdp interpretera le packet comme étant une dependance"
echo " --verbose Le programme montrera ce qui se passe en arriere plan"
echo
echo -e "--------------------- ${ORANGE}[PAGE 0 - 1]${NC}"
exit 0
Expand Down Expand Up @@ -309,7 +317,7 @@ function install_packet {
mv "${packageFilter}" / 2> /etc/cydramanager/cache/smthawful.log
fi
done
rm -rf /usr/cydramanager/pkgt/*
rm -rf "/usr/cydramanager/pkgt/*"
wget "${POOL_DL}/${PKG_ARCHIVE}" -P "${INSTALL_DIR}" --no-check-certificate -q
tar xf "${INSTALL_DIR}${PKG_ARCHIVE}" -C "/usr/cydramanager/pkgt"
tar xf "${INSTALL_DIR}${PKG_ARCHIVE}" -C "/"
Expand Down Expand Up @@ -503,14 +511,16 @@ function firstupdate_wash {
}

if [ "$SHOW_HELP" = true ]; then
if [ "$PRINT_LOG" = true ]; then
open_help
fi
if [ "$PRINT_LOG" = true ]; then
open_help
fi
fi

if [ "$PRINT_MIRROR" = true ]; then
echo "${MIRROR_URL}"
exit 0
if [ "$PRINT_LOG" = true ]; then
echo "${MIRROR_URL}"
exit 0
fi
fi

if [[ "$1" != "install" && "$1" != "remove" && "$1" != "update" && "$1" != "fetch" && "$1" != "help" && "$1" != "version" && "$1" != "patchnote" && "changever" != "$1" ]]; then
Expand Down Expand Up @@ -981,4 +991,9 @@ elif [[ ${3} == "back" ]]; then
echo -e "${ORANGE}En construction..${NC}"
fi


if [ "$VERBOSE" = true ]; then
set +x
fi

exit 0

0 comments on commit 0461b02

Please sign in to comment.