summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-pacman.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-03 12:35:39 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-03 12:35:39 +0100
commit88a5e2f6bea02a0f3b6ea32e6e7b4b96d1fbe9b7 (patch)
tree57d8c69b791cfd32cd0adfb5015b0835a9aad440 /src/core/libs/lib-pacman.sh
parent08a0a991a5daec785ee7e7148a504249a59e5ea3 (diff)
big decoupling of flow control from rest in interactive profile + various fixes
Diffstat (limited to 'src/core/libs/lib-pacman.sh')
-rw-r--r--src/core/libs/lib-pacman.sh79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh
index 4f64794..36750b0 100644
--- a/src/core/libs/lib-pacman.sh
+++ b/src/core/libs/lib-pacman.sh
@@ -96,82 +96,3 @@ pacman_what_is_this_for ()
! [ -d /var/lib/pacman ] && mkdir -p /var/lib/pacman
}
-
-
-# select_mirror(). taken from setup. TODO: get the UI code out of here
-# Prompt user for preferred mirror and set $var_SYNC_URL
-#
-# args: none
-# returns: nothing
-select_mirror() {
- notify "Keep in mind ftp.archlinux.org is throttled.\nPlease select another mirror to get full download speed."
- # FIXME: this regex doesn't honor commenting
- MIRRORS=$(egrep -o '((ftp)|(http))://[^/]*' "${MIRRORLIST}" | sed 's|$| _|g')
- _dia_DIALOG --menu "Select an FTP/HTTP mirror" 14 55 7 \
- $MIRRORS \
- "Custom" "_" 2>$ANSWER || return 1
- local _server=$(cat $ANSWER)
- if [ "${_server}" = "Custom" ]; then
- _dia_DIALOG --inputbox "Enter the full URL to core repo." 8 65 \
- "ftp://ftp.archlinux.org/core/os/i686" 2>$ANSWER || return 1
- var_SYNC_URL=$(cat $ANSWER)
- else
- # Form the full URL for our mirror by grepping for the server name in
- # our mirrorlist and pulling the full URL out. Substitute 'core' in
- # for the repository name, and ensure that if it was listed twice we
- # only return one line for the mirror.
- var_SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | sed 's/\$repo/core/g' | head -n1)
- fi
- echo "Using mirror: $var_SYNC_URL" >$LOG
-}
-
-# select_source(). taken from setup. TODO: decouple ui
-# displays installation source selection menu
-# and sets up relevant config files
-#
-# params: none
-# returns: nothing
-select_source()
-{
- DIALOG --menu "Please select an installation source" 10 35 3 \
- "1" "CD-ROM or OTHER SOURCE" \
- "2" "FTP/HTTP" 2>$ANSWER
-
- case $(cat $ANSWER) in
- "1")
- MODE="cd"
- ;;
- "2")
- MODE="ftp"
- ;;
- esac
-
- if [ "$MODE" = "cd" ]; then
- TITLE="Arch Linux CDROM or OTHER SOURCE Installation"
- DIALOG --msgbox "Packages included on this disk have been mounted to /src/core/pkg. If you wish to use your own packages from another source, manually mount them there." 0 0
- if [ ! -d /src/core/pkg ]; then
- DIALOG --msgbox "Package directory /src/core/pkg is missing!" 0 0
- return 1
- fi
- echo "Using CDROM for package installation" >$LOG
- else
- TITLE="Arch Linux FTP/HTTP Installation"
- DIALOG --msgbox "If you wish to load your ethernet modules manually, please do so now in another terminal." 12 65
- while true; do
- DIALOG --menu "FTP Installation" 10 35 3 \
- "0" "Setup Network" \
- "1" "Choose Mirror" \
- "2" "Return to Main Menu" 2>$ANSWER
-
- case "$(cat $ANSWER)" in
- "0")
- donetwork ;;
- "1")
- select_mirror ;;
- *)
- break ;;
- esac
- done
- fi
- S_SRC=1
-}