blob: 138dec6852ae7285a4db67e4342fba19b7f48dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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="pyanaconda-${FETCH_VER}.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 )
find /usr/lib/python?.?/site-packages/pyanaconda -name "*.py*" | xargs rm
tar xjf "${FETCH_FN}" -C /tmp
cp /tmp/pyanaconda/* /usr/lib/python?.?/site-packages/pyanaconda/ -Rp
rm /tmp/pyanaconda -rf
rm "${FETCH_FN}*" -rf
echo "ALL FINE, respawn the installer"
exit 0
else
echo "OUCH, something bad happened"
exit 1
fi
|