📄 make-dmg.sh
字号:
#!/bin/sh## $Id: make-dmg.sh,v 1.1 2002/12/19 03:01:44 bdenney Exp $## Make a DMG of Bochs. This script must be run from the main source # directory, e.g. "./build/macosx/make-dmg.sh". If you haven't run# configure yet, it runs .conf.macosx for you. Then it creates a # temporary directory _dmg_top and does a make install into that# directory, and builds a disk image. At the end it cleans up the# temporary directory.#VERSION=@VERSION@ # substituted in with configure scriptVERSION=2.0.pre4BUILDROOT=./_dmg_topINSTALL_PREFIX=$BUILDROOT/Bochs-${VERSION}DMG=./Bochs-${VERSION}.dmg# test if we're in the right directory. if not, bomb.echo '-- Is the script run from the right directory?'if test -f main.cc -a -f bochs.h; then echo yeselse echo no echo ERROR: Run it from the top of the Bochs source tree, where bochs.h is found. exit 10fi# test if configure has been run already. if not, run .conf.macosx.configured=0echo '-- Has configure been run already?'if test -f config.h -a -f Makefile; then echo yeselse echo no. I will run .conf.macosx now. /bin/sh -x .conf.macosx conf_retcode=$? configured=1 if test "$conf_retcode" != 0; then echo ERROR: configure failed. Correct errors in .conf.macosx and try again. exit 20 fi fi# remove any leftovers from previous image creation.echo "-- Removing leftovers from previous runs"rm -rf ${BUILDROOT} ${BUILDROOT}.dmg ${DMG}# make new buildroot directoryecho "-- Making ${BUILDROOT} directory"mkdir ${BUILDROOT} && mkdir ${INSTALL_PREFIX}if test $? != 0; then echo ERROR: mkdir ${BUILDROOT} or mkdir ${INSTALL_PREFIX} failed exit 30fi# run make and then make install into itecho "-- Running make"makeif test $? != 0; then echo ERROR: make failed exit 40fiecho "-- Running make install with prefix=${INSTALL_PREFIX}"make install prefix=${INSTALL_PREFIX}if test $? != 0; then echo ERROR: make install with prefix=${INSTALL_PREFIX} failed exit 50fi# create new disk imageecho "-- Making a disk image with root at ${BUILDROOT}, using diskimage.pl"./build/macosx/diskimage.pl ${BUILDROOT}if test $? != 0; then echo ERROR: diskimage.pl script failed exit 60fiif test ! -f ${BUILDROOT}.dmg; then echo ERROR: diskimage.pl succeeded but I cannot find the image ${BUILDROOT}.dmg. exit 70fi# rename to the right thingecho "-- Renaming the output disk image to ${DMG}"mv ${BUILDROOT}.dmg ${DMG}if test $? != 0; then echo ERROR: rename failed exit 80fiecho "-- Done! The final disk image is "ls -l ${DMG}echo "-- Cleaning up the temporary files in ${BUILDROOT}"rm -rf ${BUILDROOT}exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -