summaryrefslogtreecommitdiff
path: root/ezjail-release.sh
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2006-02-20 12:59:53 +0000
committererdgeist <erdgeist@erdgeist.org>2006-02-20 12:59:53 +0000
commita32a79562c12d1048042850be1973d125a2c1d28 (patch)
tree6f4bb8c7c5e6cf3a5f6a33323ba78ea31938aea7 /ezjail-release.sh
parent00a6f484a58080ad27cb105625b9d7dbcaf74743 (diff)
refining search strategies
Diffstat (limited to 'ezjail-release.sh')
-rwxr-xr-xezjail-release.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/ezjail-release.sh b/ezjail-release.sh
index 7db3f1c..66c2a5b 100755
--- a/ezjail-release.sh
+++ b/ezjail-release.sh
@@ -49,7 +49,7 @@ release)
49 done 49 done
50 50
51 basejail_arch=`uname -p` 51 basejail_arch=`uname -p`
52 basejail_server=${basejail_server:-"ftp.freebsd.org:"} 52 basejail_server=${basejail_server:-"ftp.freebsd.org"}
53 basejail_server=${basejail_server#ftp://} 53 basejail_server=${basejail_server#ftp://}
54 basejail_dir=${basejail_server#file://} 54 basejail_dir=${basejail_server#file://}
55 [ "${basejail_dir%%[!/]*}" ] || basejail_reldir=${PWD} 55 [ "${basejail_dir%%[!/]*}" ] || basejail_reldir=${PWD}
@@ -79,9 +79,10 @@ release)
79 if [ "${basejail_dir}" = "${basejail_server}" ]; then 79 if [ "${basejail_dir}" = "${basejail_server}" ]; then
80 mkdir -p ${basejail_tmp} || exerr "Could not create temporary base jail directory ${basejail_tmp}." 80 mkdir -p ${basejail_tmp} || exerr "Could not create temporary base jail directory ${basejail_tmp}."
81 cd ${basejail_tmp} 81 cd ${basejail_tmp}
82 for basejail_path in /pub/FreeBSD/releases /pub/FreeBSD/snapshot /FreeBSD NO; do 82 for basejail_path in pub/FreeBSD/releases pub/FreeBSD/snapshot pub/FreeBSD releases snapshots NO; do
83 [ "${basejail_path}" = "NO" ] && exerr "Could not fetch ${pkg} from ${basejail_server}." 83 [ "${basejail_path}" = "NO" ] && exerr "Could not fetch ${pkg} from ${basejail_server}."
84 ftp "${basejail_server}${basejail_path}/${basejail_arch}/${basejail_release}/${pkg}/*" > /dev/null && break 84echo "${basejail_server}:${basejail_path}/${basejail_arch}/${basejail_release}/${pkg}/*"
85 ftp "${basejail_server}:${basejail_path}/${basejail_arch}/${basejail_release}/${pkg}/*" && break
85 done 86 done
86 [ -f install.sh ] && yes | . install.sh 87 [ -f install.sh ] && yes | . install.sh
87 rm -rf ${basejail_tmp} 88 rm -rf ${basejail_tmp}