Browse Source

Merge pull request #204 from oleorhagen/MEN-3527

MEN-3527: Fix regressions introduced during refactoring
2.1.x
oleorhagen 5 years ago
committed by GitHub
parent
commit
beda9eca9b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 11
      mender-convert
  3. 2
      modules/decompressinput.sh

1
.gitignore

@ -5,3 +5,4 @@ rootfs_overlay_demo/*
mender_local_config
*.xml
*.html
convert.log

11
mender-convert

@ -18,6 +18,9 @@ source modules/bootstrap.sh
source modules/cliparser.sh
source modules/decompressinput.sh
mkdir -p work
touch work/convert.log
###############################################################################
# Declaration of important variables for this file #
###############################################################################
@ -26,11 +29,11 @@ declare compression_type="" # Detected input file compression, also applied to
declare ocfile="./work/override_compression_config"
declare disk_image="" # Needed in parse_cli_options, and is passed to decompress_image()
declare -a overlays=() # [Dummy] Needed in parse_cli_options, not here
declare -a configs=() # [Dummy] Needed in parse_cli_options, not here
declare -a configs=() # [Dummy] Needed in parse_cli_options, not here
MENDER_ARTIFACT_NAME="${MENDER_ARTIFACT_NAME:-}" # Required env variable
MENDER_CONVERT_VERSION="${MENDER_CONVERT_VERSION:-}" # Required env variable
###############################################################################
MENDER_CONVERT_VERSION=$(git describe --tags --dirty --exact-match 2>/dev/null || git rev-parse --short HEAD)
function show_help() {
cat << EOF
mender-convert
@ -113,8 +116,6 @@ if [ -z "${MENDER_ARTIFACT_NAME}" ]; then
echo -e "\tMENDER_ARTIFACT_NAME=\"release-1\" ./mender-convert"
exit 1
fi
mkdir -p work
touch work/convert.log
parse_cli_options "$@"

2
modules/decompressinput.sh

@ -81,7 +81,7 @@ function decompress_image () {
xzcat "${input_image}" > "${disk_image}"
;;
* )
log_fatal "Unsupported input image type: ${input_image}"
log_fatal "Unsupported input image format: ${input_image}. We support: '.img', '.gz', '.zip', '.xz'."
;;
esac
echo "${disk_image}"

Loading…
Cancel
Save