Skip to content

Commit

Permalink
Merge pull request #82 from kloptops/main
Browse files Browse the repository at this point in the history
Fixed do_release stable, added autoinstall for muOS.
  • Loading branch information
kloptops authored Mar 10, 2024
2 parents 29d3afd + b4a9574 commit 7471d54
Show file tree
Hide file tree
Showing 14 changed files with 727 additions and 580 deletions.
73 changes: 73 additions & 0 deletions PortMaster/muos/PortMaster.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

controlfolder="/mnt/mmc/MUOS/PortMaster"
toolsfolderloc="/mnt/mmc/MUOS/"

if [ ! -z "$(df | grep '/mnt/sdcard')" ]; then
directory="/mnt/sdcard"
Expand All @@ -21,6 +22,78 @@ CUR_TTY=/dev/tty0

cd "$controlfolder"

## Autoinstallation Code
# This will automatically install zips found within the PortMaster/autoinstall directory using harbourmaster
AUTOINSTALL=$(find "${toolsfolderloc}/PortMaster/autoinstall" -type f \( -name "*.zip" -o -name "*.squashfs" \))
if [ -n "$AUTOINSTALL" ]; then
source "$controlfolder/PortMasterDialog.txt"

GW=$(PortMasterIPCheck)
PortMasterDialogInit "no-check"

PortMasterDialog "messages_begin"

PortMasterDialog "message" "Auto-installation"

# Install the latest runtimes.zip
if [ -f "${toolsfolderloc}/PortMaster/autoinstall/runtimes.zip" ]; then
PortMasterDialog "message" "- Installing runtimes.zip, this could take a minute or two."
$ESUDO unzip -o "${toolsfolderloc}/PortMaster/autoinstall/runtimes.zip" -d "${toolsfolderloc}/PortMaster/libs"
$ESUDO rm -f "${toolsfolderloc}/PortMaster/autoinstall/runtimes.zip"
PortMasterDialog "message" "- SUCCESS: runtimes.zip"
fi

for file_name in "${toolsfolderloc}/PortMaster/autoinstall"/*.squashfs
do
if [ ! -f "$file_name" ]; then
continue
fi

$ESUDO mv -f "$file_name" "${toolsfolderloc}/PortMaster/libs"
PortMasterDialog "message" "- SUCCESS: $(basename $file_name)"
done

for file_name in "${toolsfolderloc}/PortMaster/autoinstall"/*.zip
do
if [[ "$(basename $file_name)" == "PortMaster.zip" ]]; then
continue
fi

if [ ! -f "$file_name" ]; then
continue
fi

if [[ $(PortMasterDialogResult "install" "$file_name") == "OKAY" ]]; then
$ESUDO rm -f "$file_name"
PortMasterDialog "message" "- SUCCESS: $(basename $file_name)"
else
PortMasterDialog "message" "- FAILURE: $(basename $file_name)"
fi
done

if [ -f "${toolsfolderloc}/PortMaster/autoinstall/PortMaster.zip" ]; then
file_name="${toolsfolderloc}/PortMaster/autoinstall/PortMaster.zip"

if [[ $(PortMasterDialogResult "install" "$file_name") == "OKAY" ]]; then
$ESUDO rm -f "$file_name"
PortMasterDialog "message" "- SUCCESS: $(basename $file_name)"
else
PortMasterDialog "message" "- FAILURE: $(basename $file_name)"
fi
fi

PortMasterDialog "messages_end"
if [ -z "$GW" ]; then
PortMasterDialogMessageBox "Finished running autoinstall.\n\nNo internet connection present so exiting."
PortMasterDialogExit
exit 0
else
PortMasterDialogMessageBox "Finished running autoinstall."
PortMasterDialogExit
fi
fi


export TERM=linux
$ESUDO chmod 666 $CUR_TTY
printf "\033c" > $CUR_TTY
Expand Down
4 changes: 3 additions & 1 deletion PortMaster/pugwash
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ __builtins__.CURRENT_LANG = None

ALL_LANGUAGES = {
## Keep it in order of importance, for example pt_PT before pt_BR.
"de_DE": _("German"),
"da_DK": _("Danish"),
"de_DE": _("German"),
"en_US": _("English"),
"es_ES": _("Spanish"),
"fi_FI": _("Finnish"),
Expand All @@ -140,6 +140,8 @@ ALL_LANGUAGES = {
"pl_PL": _("Polish"),
"pt_PT": _("Portuguese (Portugal)"),
"pt_BR": _("Portuguese (Brazil)"),
"ru_RU": _("Russian"),
"uk_UA": _("Ukrainian"),
"zh_CN": _("Chinese Simplified"),
}

Expand Down
Loading

0 comments on commit 7471d54

Please sign in to comment.