diff options
author | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2007-10-31 09:59:01 -0400 |
---|---|---|
committer | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2007-10-31 10:20:15 -0400 |
commit | 800687e9ba9cc4cd476937bfc0da172d50bd58b8 (patch) | |
tree | bff240369061d91592eeed802a1d0f73d330c49e | |
parent | ae8cb3bce02962693c52019eba0a14748cad5416 (diff) | |
download | vyos-live-build-800687e9ba9cc4cd476937bfc0da172d50bd58b8.tar.gz vyos-live-build-800687e9ba9cc4cd476937bfc0da172d50bd58b8.zip |
allow basename of net-root-path to be binary
This is convenient for testing as you can directly export
the build directory, rather than untarring the net image
in another location.
-rwxr-xr-x | helpers/lh_binary_net | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net index 8c61bcec0..3eb8b677b 100755 --- a/helpers/lh_binary_net +++ b/helpers/lh_binary_net @@ -59,21 +59,28 @@ then fi # Creating image file -if [ "$(basename ${LH_NET_ROOT_PATH})" = "chroot" ] +ROOT_DIR=$(basename ${LH_NET_ROOT_PATH}) +if [ "${ROOT_DIR}" = "chroot" ] then mv chroot chroot.tmp fi -mv binary "$(basename ${LH_NET_ROOT_PATH})" +if [ "${ROOT_DIR}" != "binary" ] +then + mv binary ${ROOT_DIR} +fi cd .. -tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/$(basename ${LH_NET_ROOT_PATH})" "$(basename ${OLDPWD})/tftpboot" +tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot" mv binary-net.tar.gz "${OLDPWD}" cd "${OLDPWD}" -mv "$(basename ${LH_NET_ROOT_PATH})" binary +if [ "${ROOT_DIR}" != "binary" ] +then + mv ${ROOT_DIR} binary +fi -if [ "$(basename ${LH_NET_ROOT_PATH})" = "chroot" ] +if [ "${ROOT_DIR}" = "chroot" ] then mv chroot.tmp chroot fi |