diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index 10e6b5b..a3ac628 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -29,9 +29,9 @@ jobs: env: SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS: 1 - # # Make sure the snap is installable - # - run: | - # sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }} + # Make sure the snap is installable + - run: | + sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }} # Save snap for subsequent job(s) - uses: actions/upload-artifact@v3 diff --git a/snap/local/launcher.sh b/snap/local/launcher.sh index c982f32..ecf3625 100755 --- a/snap/local/launcher.sh +++ b/snap/local/launcher.sh @@ -1,38 +1,26 @@ #!/bin/bash -e -log() { - local message="$1" - # Log the message with logger - logger -t "${SNAP_NAME}" "launcher: $message" -} - -log_and_echo() { - local message="$1" - # Log the message with logger - logger -t "${SNAP_NAME}" "configure hook: $message" - # Echo the message to standard error - echo >&2 "$message" -} +source $SNAP/usr/bin/utils.sh # Iterate over the snap parameters and retrieve their value. # If a value is set, it is forwarded to the launch file. -OPTIONS="\ - name \ - parent-frame \ - camera-model \ - cam-pos-x \ - cam-pos-y \ - cam-pos-z \ - cam-roll \ - cam-pitch \ - cam-yaw \ - params-file \ -" +OPTIONS=( + name + parent-frame + camera-model + cam-pos-x + cam-pos-y + cam-pos-z + cam-roll + cam-pitch + cam-yaw + params-file +) LAUNCH_OPTIONS="" -for OPTION in ${OPTIONS}; do +for OPTION in "${OPTIONS[@]}"; do VALUE="$(snapctl get driver.${OPTION})" if [ -n "${VALUE}" ]; then OPTION_WITH_UNDERSCORE=$(echo ${OPTION} | tr - _)