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.
This commit is contained in:
parent
ae8cb3bce0
commit
800687e9ba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue