Skip to content

Commit

Permalink
first pass at i686 support
Browse files Browse the repository at this point in the history
  • Loading branch information
corbinlc committed Nov 22, 2018
1 parent 821cad5 commit e98de7c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ BASIC_PACKAGES=(${PACMAN_PACKAGES[*]} filesystem)
EXTRA_PACKAGES=(coreutils bash grep gawk file tar systemd sed)
DEFAULT_REPO_URL="http://mirrors.kernel.org/archlinux"
DEFAULT_ARM_REPO_URL="http://mirror.archlinuxarm.org"
DEFAULT_I686_REPO_URL="https://mirror.archlinux32.org"

stderr() {
echo "$@" >&2
Expand Down Expand Up @@ -77,14 +78,16 @@ get_default_repo() {
local ARCH=$1
if [[ "$ARCH" == arm* || "$ARCH" == aarch64 ]]; then
echo $DEFAULT_ARM_REPO_URL
elif [[ "$ARCH" == i686 ]]; then
echo $DEFAULT_I686_REPO_URL
else
echo $DEFAULT_REPO_URL
fi
}

get_core_repo_url() {
local REPO_URL=$1 ARCH=$2
if [[ "$ARCH" == arm* || "$ARCH" == aarch64 ]]; then
if [[ "$ARCH" == arm* || "$ARCH" == aarch64 || "$ARCH" == i686 ]]; then
echo "${REPO_URL%/}/$ARCH/core"
else
echo "${REPO_URL%/}/core/os/$ARCH"
Expand All @@ -93,7 +96,7 @@ get_core_repo_url() {

get_template_repo_url() {
local REPO_URL=$1 ARCH=$2
if [[ "$ARCH" == arm* || "$ARCH" == aarch64 ]]; then
if [[ "$ARCH" == arm* || "$ARCH" == aarch64 || "$ARCH" == i686 ]]; then
echo "${REPO_URL%/}/$ARCH/\$repo"
else
echo "${REPO_URL%/}/\$repo/os/$ARCH"
Expand Down

0 comments on commit e98de7c

Please sign in to comment.