blob: 3376877c64848522ea59fd99642cb183c109c0cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
_fetch_ver="5"
[[ -f "/etc/gentoo-edition" ]] && _fetch_ver=$(cat /etc/gentoo-edition | cut -d" " -f 3)
FETCH_VER=${FETCH_VER:-${_fetch_ver}}
FETCH_FN="anaconda-${FETCH_VER}-$(uname -m).tar.bz2"
FETCH_URL=${FETCH_URL:-"http://www.gentoo.org/gentoo/installer/${FETCH_FN}"}
cd /tmp
rm -rf "/tmp/${FETCH_FN}"*
echo "Fetching Gentoo Anaconda Installer from ${FETCH_URL}..."
wget ${FETCH_WGET_ARGS} "${FETCH_URL}" "${FETCH_URL}.md5"
if [ "${?}" = "0" ]; then
md5sum -c "${FETCH_FN}.md5" || ( echo "OUCH, md5 does not match" && exit 1 )
tar xjf "${FETCH_FN}" -C /
echo "ALL FINE, respawn the installer"
exit 0
else
echo "OUCH, something bad happened"
exit 1
fi
|