Skip to content

Instantly share code, notes, and snippets.

@drinkcat
Created November 11, 2013 05:30
Show Gist options
  • Save drinkcat/7408364 to your computer and use it in GitHub Desktop.
Save drinkcat/7408364 to your computer and use it in GitHub Desktop.
#!/bin/sh -e
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file is sourced from main.sh to update distro-specific defaults.
# It must set at least ARCH and MIRROR if not already specified.
if [ -z "$ARCH" ]; then
ARCH="`uname -m | sed -e 's i.86 i386 ;s x86_64 amd64 ;s arm.* armhf ;'`"
fi
if [ -z "$MIRROR" ]; then
if [ "$ARCH" = 'x86_64' -o "$ARCH" = 'i586' ]; then
MIRROR='http://ftp.aarnet.edu.au/pub/mageia/distrib/${RELEASE#mageia}/x86_64/media/core/release/'
# eg http://mirror.aarnet.edu.au/pub/mageia/distrib/3/x86_64/media/core/release/
else
MIRROR='http://packages.rtp-net.org/mageia/${RELEASE#mageia}/armv5tl/media/core/release/'
# eg http://packages.rtp-net.org/mageia/1/armv5tl/media/core/release/
fi
fi
@drinkcat
Copy link
Author

L10 should be:

ARCH="`uname -m | sed -e 's i.86 i586 ;s arm.* armv5tl ;'`"

(x86 default is i586 on mageia, x86_64 is already correct)

@drinkcat
Copy link
Author

L15 should then be:

 MIRROR="http://ftp.aarnet.edu.au/pub/mageia/distrib/${RELEASE#mageia}/$ARCH/media/core/release/"

Careful that variables do not get expanded in single quotes ('), only in double quotes.
And it should be a default mirror (i.e. not an Australian one). But that's really a detail for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment