Tidying
This commit is contained in:
parent
4463d10467
commit
bff65b86d1
|
@ -31,6 +31,7 @@
|
|||
PROJECT_NAME='freedombone'
|
||||
IMAGE_TYPE='beaglebone'
|
||||
CURR_DIR=$(pwd)
|
||||
CURR_USER=$(echo $USER)
|
||||
BUILD_DIR=~/.tmp_${PROJECT_NAME}_build
|
||||
VMDEBOOTSTRAP_REPO=git://git.liw.fi/vmdebootstrap
|
||||
VMDEBOOTSTRAP_VERSION=0.8
|
||||
|
@ -149,9 +150,10 @@ if [ ! $PASSWORD ]; then
|
|||
PASSWORD="$(openssl rand -base64 10 | cut -c1-8)"
|
||||
fi
|
||||
|
||||
rm $CURR_DIR/*.img.bz2
|
||||
rm $CURR_DIR/*.img
|
||||
rm $CURR_DIR/*.sig
|
||||
rm $CURR_DIR/${PROJECT_NAME}*.img.bz2
|
||||
rm $CURR_DIR/${PROJECT_NAME}*.img
|
||||
rm $CURR_DIR/${PROJECT_NAME}*.sig
|
||||
rm $CURR_DIR/${PROJECT_NAME}*.vdi
|
||||
|
||||
if [ -d $BUILD_DIR ]; then
|
||||
rm -rf $BUILD_DIR
|
||||
|
@ -164,6 +166,7 @@ else
|
|||
fi
|
||||
|
||||
cp -r /etc/${PROJECT_NAME}/* $BUILD_DIR
|
||||
chown -R $CURR_USER:$CURR_USER $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
|
||||
rm -rf vendor
|
||||
|
@ -205,13 +208,14 @@ fi
|
|||
mv build/${PROJECT_NAME}*.bz2 ${CURR_DIR}
|
||||
mv build/${PROJECT_NAME}*.img ${CURR_DIR}
|
||||
mv build/${PROJECT_NAME}*.sig ${CURR_DIR}
|
||||
mv build/${PROJECT_NAME}*.vdi ${CURR_DIR}
|
||||
rm -rf ${BUILD_DIR}
|
||||
|
||||
cd ${CURR_DIR}
|
||||
if [[ $IMAGE_TYPE == "virtualbox"* ]]; then
|
||||
imgfiles=(${PROJECT_NAME}*.img)
|
||||
VBoxManage convertdd ${imgfiles[0]} ${imgfiles[0]}.vdi
|
||||
fi
|
||||
#if [[ $IMAGE_TYPE == "virtualbox"* ]]; then
|
||||
# imgfiles=(${PROJECT_NAME}*.img)
|
||||
# VBoxManage convertdd ${imgfiles[0]} ${imgfiles[0]}.vdi
|
||||
#fi
|
||||
|
||||
clear
|
||||
echo "
|
||||
|
|
Loading…
Reference in New Issue