Browse Source

Export to virtualbox format

Bob Mottram 9 years ago
parent
commit
17050ada7f
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      src/freedombone-image

+ 7
- 2
src/freedombone-image View File

@@ -205,7 +205,13 @@ fi
205 205
 mv build/${PROJECT_NAME}*.bz2 ${CURR_DIR}
206 206
 mv build/${PROJECT_NAME}*.img ${CURR_DIR}
207 207
 mv build/${PROJECT_NAME}*.sig ${CURR_DIR}
208
-#rm -rf ${BUILD_DIR}
208
+rm -rf ${BUILD_DIR}
209
+
210
+cd ${CURR_DIR}
211
+if [[ $IMAGE_TYPE == "virtualbox"* ]]; then
212
+    imgfiles=(${PROJECT_NAME}*.img)
213
+    VBoxManage convertfromraw --format VDI ${imgfiles[0]} ${imgfiles[0]}.vdi
214
+fi
209 215
 
210 216
 clear
211 217
 echo "
@@ -217,7 +223,6 @@ You will be able to log into it with:
217 223
 
218 224
     Password: $PASSWORD
219 225
 "
220
-cd ${CURR_DIR}
221 226
 ls -lh ${PROJECT_NAME}*.img ${PROJECT_NAME}*.sig ${PROJECT_NAME}*.bz2
222 227
 
223 228
 # record the default login credentials for later use