Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncro #71

Merged
merged 11 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified testing/packagemanagers/install/cydramanager.tar.gz
Binary file not shown.
24 changes: 6 additions & 18 deletions testing/packagemanagers/install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ RED='\033[0;31m'
ORANGE='\033[0;33m'
NC='\033[0m'

currentDir=$(pwd)

ENCRYPT=true
INSTALL=false
HELP=false
Expand All @@ -28,8 +26,8 @@ function deps_check {
echo "Recherche des dependances"
if [ "$ENCRYPT" = true ]; then
if [ "$HELP" = false ]; then
if [ ! -f "/usr/bin/sch" ]; then
echo -e "${RED}Le logiciel SCH n est pas installé sur votre systeme !\n${ORANGE}Utilisez l'argument --without-encrypt-pm${NC}"
if [ ! -f "/usr/bin/shc" ]; then
echo -e "${RED}Le logiciel SHC n est pas installé sur votre systeme !\n${ORANGE}Utilisez l'argument --without-encrypt-pm${NC}"
exit 1
fi
fi
Expand All @@ -53,6 +51,7 @@ function install_files {
wget "https://raw.githubusercontent.com/acth2/CydraProject/main/packagemanager/basicmirror.list" -P /etc/cydrafetch/currentMirror.list --no-check-certificate -q
wget "https://raw.githubusercontent.com/acth2/CydraProject/main/packagemanager/fetch/mainserver.list" -P /etc/cydraterms/mainserver.list --no-check-certificate -q
wget "https://github.com/acth2/CydraProject/raw/main/packagemanager/installedsoftware/installedarchive.tar.gz" -P /etc/cydraterms/installedsoftware --no-check-certificate -q
wget "https://raw.githubusercontent.com/acth2/CydraProject/main/testing/packagemanagers/software/cydramanager" -P ./pm/cydramanager --no-check-certificate -q
touch /etc/cydrafetch/1.mirror
touch /etc/cydrafetch/2.mirror
touch /etc/cydrafetch/3.mirror
Expand All @@ -73,19 +72,12 @@ function write_files {
echo "http://mir.archlinux.fr" > /etc/cydrafetch/currentMirror

if [ "$ENCRYPT" = true ]; then
cd "${currentDir}/pm"
shc -f cydramanager -o cydramanager2
shc -f ./pm/cydramanager -o ./pm/cydramanager2
fi
tar xf /etc/cydraterms/installedsoftware/installedarchive.tar.gz -C /etc/cydraterms/installedsoftware
rm -f /etc/cydraterms/installedsoftware/installedarchive.tar.gz
}

function set_path {
echo "NEW_PATH=$PATH:$(find "/usr/cydramanager/currentSoftware" -maxdepth 1 -type d | paste -sd ":" -)" > /etc/profile
echo "export PATH=${NEW_PATH}" > /etc/profile
export PATH=${NEW_PATH}
}

function start_operation {
if [ "$HELP" = true ]; then
echo -e "Programme d'installation de cydramanager:"
Expand All @@ -110,20 +102,16 @@ function start_operation {
write_files

if [ "$ENCRYPT" = true ]; then
cp -r "${currentDir}/pm/cydramanager2" /usr/bin/cydramanager
cp -r "./pm/cydramanager2" /usr/bin/cydramanager
echo -e "${GREEN} -3: Protection du gestionnaire de packets${NC}"
else
cp -r "${currentDir}/pm/cydramanager" /usr/bin/cydramanager
cp -r "./pm/cydramanager" /usr/bin/cydramanager
echo -e "${ORANGE} -3: Protection du gestionnaire de packets (PASSÉ)${NC}"
fi
chmod +rwx /usr/bin/cydramanager

echo -e "${GREEN} -4: Changement du PATH de votre systeme"
set_path

echo -e "${GREEN} --: Gestionnaire de packet installé${NC}"
echo -e "${ORANGE}USAGE: sudo cydramanager help${NC}"
cd ${currentDir}
exit 0
else
echo -e "${ORANGE}Pour commencé l'installation veuillez utilisé l'argument --install !${NC}"
Expand Down
Loading