Skip to content

Commit

Permalink
Bail out if architecture isn't set nor can be identified automatically
Browse files Browse the repository at this point in the history
If `dpkg --print-architecture` isn't available for detecting the current
architecture (e.g. on non-Debian), and neither $ARCH is set nor `--arch
...` was specified, abort and inform user about it.

Closes: #173
  • Loading branch information
mika committed May 21, 2021
1 parent 4d625ea commit 360e057
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grml-debootstrap
Expand Up @@ -1155,6 +1155,12 @@ else
ARCHCMD="--arch $ARCH"
ARCHINFO=" (${ARCH})"
fi

if [ -z "${ARCH:-}" ] ; then
eerror 'Architecture neither set (environment variable ARCH), nor could be automatically identified (using dpkg).'
eerror 'Consider setting the --arch ... option.' ; eend 1
bailout 1
fi
# }}}

# It is not possible to build amd64 on i686. {{{
Expand Down

0 comments on commit 360e057

Please sign in to comment.