瀏覽代碼

Export to virtualbox format

Bob Mottram 9 年之前
父節點
當前提交
17050ada7f
共有 1 個檔案被更改,包括 7 行新增2 行删除
  1. 7
    2
      src/freedombone-image

+ 7
- 2
src/freedombone-image 查看文件

@@ -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