Skip to content

Instantly share code, notes, and snippets.

@henrich
Created March 8, 2019 05:48
Show Gist options
  • Save henrich/97c5dda6f818a8b49279346d24b8cfb3 to your computer and use it in GitHub Desktop.
Save henrich/97c5dda6f818a8b49279346d24b8cfb3 to your computer and use it in GitHub Desktop.
translate architecture name
diff --git a/debootstrap b/debootstrap
index bc5e522..b17bc8b 100755
--- a/debootstrap
+++ b/debootstrap
@@ -234,6 +234,23 @@ if [ $# != 0 ] ; then
else
error 1 NEEDARG "option requires an argument %s" "$1"
fi
+
+ case "$ARCH" in
+ x86[_-]64)
+ ARCH="amd64"
+ echo "I: set ARCH as $ARCH"
+ ;;
+ x86|i[4-6]86)
+ ARCH="i386"
+ echo "I: set ARCH as $ARCH"
+ ;;
+ aarch64)
+ ARCH="arm64"
+ echo "I: set ARCH as $ARCH"
+ ;;
+ *)
+ ;;
+ esac
;;
--extractor|--extractor=?*)
if [ "$1" = "--extractor" ] && [ -n "$2" ] ; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment