Support for list of params optimization

This commit is contained in:
AGG2017 2024-02-15 20:42:58 -05:00
parent 93069d9b9b
commit f44463e616
12 changed files with 20 additions and 20 deletions

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
image_set=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
image_set="$2"
# check the project root folder
if [ ! -d "$project_root" ]; then

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
boot_resource=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
boot_resource="$2"
# check the project root folder
if [ ! -d "$project_root" ]; then

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
public_key=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
public_key="$2"
# check the project root folder
if [ ! -d "$project_root" ]; then

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
fswebcam_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
fswebcam_package="$2"
# check the required tools
TOOL_LIST=("unzip")

View file

@ -13,7 +13,7 @@ if [ $# != 2 ]; then
fi
def_target="$1/unpacked/squashfs-root/app/app"
def_url=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
def_url="$2"
# check the input file
if [ ! -f "$def_target" ]; then

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
opkg_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
opkg_package="$2"
# check the required tools
TOOL_LIST=("unzip")

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
password_hash=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
password_hash="$2"
# check the project root folder
if [ ! -d "$project_root" ]; then

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
ssh_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
ssh_package="$2"
# check the required tools
TOOL_LIST=("unzip")

View file

@ -6,16 +6,16 @@ NC='\033[0m'
# check the parameters
if [ $# != 2 ]; then
echo "usage : $0 <project_root> <startup_script_package>"
echo "usage : $0 <project_root> <startup_script>"
exit 1
fi
project_root="$1"
startup_script_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
startup_script="$2"
# Check if startup.sh is available
if [ ! -f "$project_root/RESOURCES/OPTIONS/startup_script/startup.sh" ]; then
echo -e "${RED}ERROR: Cannot find the file 'startup.sh' ${NC}"
# Check if $startup_script is available
if [ ! -f "$project_root/RESOURCES/OPTIONS/startup_script/$startup_script" ]; then
echo -e "${RED}ERROR: Cannot find the file '$startup_script' ${NC}"
exit 2
fi
@ -35,10 +35,10 @@ fi
mkdir -p "$project_root/unpacked/squashfs-root/etc/ssl/certs"
cp -rf "$project_root/RESOURCES/KEYS/mosquitto"/* "$project_root/unpacked/squashfs-root/etc/ssl/certs"
# Move startup.sh to project root/unpacked/squashfs-root/etc
cp -rf "$project_root/RESOURCES/OPTIONS/startup_script/startup.sh" "$project_root/unpacked/squashfs-root/etc"
# Move $startup_script to project root/unpacked/squashfs-root/etc
cp -rf "$project_root/RESOURCES/OPTIONS/startup_script/$startup_script" "$project_root/unpacked/squashfs-root/etc"
# Add /etc/startup.sh to $project_root/unpacked/squashfs-root/etc/rc.local before the exit 0 line
sed -i '/exit 0/i /etc/startup.sh' "$project_root/unpacked/squashfs-root/etc/rc.local"
# Add /etc/$startup_script to $project_root/unpacked/squashfs-root/etc/rc.local before the exit 0 line
sed -i "/exit 0/i /etc/$startup_script" "$project_root/unpacked/squashfs-root/etc/rc.local"
exit 0

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
uart_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
uart_package="$2"
# check the required tools
TOOL_LIST=("unzip")

View file

@ -11,7 +11,7 @@ if [ $# != 2 ]; then
fi
project_root="$1"
webcam_package=$(echo "$2" | sed -e 's/^"//' -e 's/"$//')
webcam_package="$2"
# check the required tools
TOOL_LIST=("unzip")

View file

@ -43,7 +43,7 @@ ssh="dropbear"
# Replace the URL below with the URL of your MQTT server
# You also need to transfer to the printer your keys in
# the /user folder by ssh as explained in the project page
# kobra_unleashed="localhost.mr-a.de"
#kobra_unleashed="localhost.mr-a.de"
# Replace some of the app images
#app_images="set1"