diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-20 11:47:18 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-20 11:47:18 +0100 |
commit | ce3afefeb9728619a06989a67e7ffd5ed299ecf8 (patch) | |
tree | 5e35a50c37e506c72cc58b79c811e7aad30447d5 | |
parent | 2f839ffec30eea2025cced9fb690ab612795c6ac (diff) |
softcode architecture + some small misc stuff in yaourt lib
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 2 | ||||
-rw-r--r-- | src/core/procedures/base | 2 | ||||
-rw-r--r-- | src/core/procedures/quickinst | 6 | ||||
-rw-r--r-- | unofficial/modules/yaourt/libs/lib-yaourt-sh | 9 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index f7f4ecb..543495a 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -864,7 +864,7 @@ interactive_select_mirror() { ask_option no "Mirror selection" "Select an FTP/HTTP mirror" $MIRRORS "Custom" "_" || return 1 local _server=$ANSWER_OPTION if [ "${_server}" = "Custom" ]; then - ask_string "Enter the full URL to core repo." "ftp://ftp.archlinux.org/core/os/i686" || return 1 + ask_string "Enter the full URL to core repo." "ftp://ftp.archlinux.org/core/os/$var_ARCH" || return 1 var_SYNC_URL=$ANSWER_STRING else # Form the full URL for our mirror by grepping for the server name in diff --git a/src/core/procedures/base b/src/core/procedures/base index fa88210..94a9d1e 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -7,6 +7,8 @@ var_RUNTIME_PACKAGES= var_PKG_FILE=$RUNTIME_DIR/package-list var_MIRRORLIST="/etc/pacman.d/mirrorlist" var_UI_TYPE="cli" # set to cli or dia for dialog +var_ARCH=`uname -m` #works for i686 TODO: check if it works for x86_64 +[ -z "$var_ARCH" ] && die_error "Could not determine your architecture" ###### Phases ( can be overridden by more specific procedures) ###### phase_preparation=(\ diff --git a/src/core/procedures/quickinst b/src/core/procedures/quickinst index 314569c..73c1f46 100644 --- a/src/core/procedures/quickinst +++ b/src/core/procedures/quickinst @@ -25,11 +25,7 @@ usage() { echo echo "Examples:" if [ -e /usr/bin/wget ]; then - if [ "$(uname -m)" = "x86_64" ]; then - echo " quickinst ftp /mnt ftp://ftp.archlinux.org/core/os/x86_64" - else - echo " quickinst ftp /mnt ftp://ftp.archlinux.org/core/os/i686" - fi + echo " quickinst ftp /mnt ftp://ftp.archlinux.org/core/os/$var_ARCH" fi echo " quickinst cd /mnt /src/core/pkg" diff --git a/unofficial/modules/yaourt/libs/lib-yaourt-sh b/unofficial/modules/yaourt/libs/lib-yaourt-sh index fd9c4d0..56e03df 100644 --- a/unofficial/modules/yaourt/libs/lib-yaourt-sh +++ b/unofficial/modules/yaourt/libs/lib-yaourt-sh @@ -6,16 +6,17 @@ _runtime_yaourt () { if ! list_pacman_repos runtime | grep -q archlinuxfr then - add_pacman_repo runtime archlinuxfr 'Server = http://repo.archlinux.fr/i686' + add_pacman_repo runtime archlinuxfr "Server = http://repo.archlinux.fr/$var_ARCH" fi - $PACMAN -Sy yaourt || die_error "_runtime_yaourt Cannot install yaourt" - YAOURT=`sed 's/pacman/yaourt/' <<< $PACMAN` - YAOURT_TARGET=`sed 's/pacman/yaourt/' <<< $PACMAN_TARGET` + $PACMAN -Sy yaourt || die_error "_runtime_yaourt Cannot install yaourt" #TODO: library-ize package installation + YAOURT=${PACMAN//pacman/yaourt} + YAOURT_TARGET=${PACMAN_TARGET//pacman/yaourt} } _yaourt_replace_pacman () { + show_warning "Security warning!" "Keep in mind that packages on AUR are untrusted! Install them on your own risk" _runtime_yaourt PACMAN=$YAOURT PACMAN_TARGET=$YAOURT_TARGET |