10 script_path=$(readlink -f ${0%/*})
11 script_dir=$(dirname ${script_path})
13 mirror="http://ftp.jaist.ac.jp/pub/Linux/ubuntu/"
16 # Show an INFO message
18 function _msg_info () {
20 echo "[LUBS Core] INFO: ${_msg}"
23 # Show an ERROR message then exit with status
24 # _msg_error <message> <exit code>
25 function _msg_error() {
29 echo "[LUBS Core] ERROR: ${_msg}" >&2
31 if [[ ! ${_error} = 0 ]]; then
36 function install_ubuntu() {
37 _msg_info "Installing Ubuntu to '${work_dir}/airootfs/'..."
38 mkdir -p ${work_dir}/airootfs
39 debootstrap --arch=${arch} --verbose --merged-usr ${codename} ${work_dir}/airootfs ${mirror}
40 _msg_info "${codename} installed successfully!"