Merge pull request #161 from noon92/osc

Fixed --chroot-script arg
This commit is contained in:
Ruledo 2025-01-08 01:04:35 -08:00 • committed by GitHub
commit 2822eec647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View file

@ -37,7 +37,7 @@ DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-
echo "Installing dependencies for meshing-around and meshtastic cli..."
#pip config set global.extra-index-url https://www.piwheels.org/simple
pip3 install requests pyephem pytap2 meshtastic pypubsub geopy maidenhead beautifulsoup4 dadjokes schedule wikipedia googlesearch-python
if [[ $? -eq 2 ]]; then echo "Error, step failed..."; fi

View file

@ -349,13 +349,23 @@ usage() {
echo "To install the development environment use the arg 'sdk_install' and is intended to be run ONCE only."
echo "To modify the chroot and build an updated image use the arg 'modify_chroot'."
echo "To modify the kernel and build an updated image use the arg 'modify_kernel'."
echo "To specify a custom chroot script use the arg '--chroot-script /full/path/to/custom.chroot'"
echo "other args: build_env sync_foxbuntu_changes build_kernelconfig install_rootfs build_rootfs build_uboot build_firmware create_image"
echo "Example: sudo ~/foxbunto_env_setup.sh sdk_install"
echo "Example: sudo ~/foxbunto_env_setup.sh modify_chroot"
echo "Example: sudo ~/foxbunto_env_setup.sh --chroot-script /home/user/custom.chroot"
exit 0
}
################### MENU SYSTEM ###################
if [[ "${1}" == "--chroot-script" ]]; then
CHROOT_SCRIPT=${2}
echo "CHROOT_SCRIPT is set to '${CHROOT_SCRIPT}'"
echo "Press any key to continue..."
read -n 1 -s -r
shift 2 # Remove --chroot-script and its argument from the arguments list
fi
if [[ "${1}" =~ ^(-h|--help|h|help)$ ]]; then
usage
elif [[ -z ${1} ]]; then
@ -405,9 +415,6 @@ elif [[ -z ${1} ]]; then
read -n 1 -s -r
done
else
if [[ "${1}" == "--chroot-script" ]]; then
CHROOT_SCRIPT=${2}
fi
if declare -f "${1}" > /dev/null; then
"${1}"
else