makedist-recordvm: minor code cleanups
This commit is contained in:
parent
a0111bad1c
commit
3f64d62ed3
@ -64,9 +64,6 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
xinit -- $VBOX_DISPLAY &
|
xinit -- $VBOX_DISPLAY &
|
||||||
|
|
||||||
if [ "$VBOX" ]; then
|
if [ "$VBOX" ]; then
|
||||||
# -nocursor &
|
|
||||||
# &>$RECORDVM_DATA/recordvm.log &
|
|
||||||
#VBOX_USER_HOME=$RECORDVM_DATA/VirtualBox DISPLAY=:0 /opt/VirtualBox/VBoxSDL --startvm $VBOX_VMNAME --fixedmode 1024 768 32 >/dev/null &
|
|
||||||
trap "VBoxManage controlvm $VBOX_VMNAME poweroff" INT QUIT TSTP
|
trap "VBoxManage controlvm $VBOX_VMNAME poweroff" INT QUIT TSTP
|
||||||
|
|
||||||
sleepcnt=0
|
sleepcnt=0
|
||||||
@ -74,8 +71,6 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
if [ "`VBoxManage list runningvms | grep $VBOX_VMNAME`" ]; then
|
if [ "`VBoxManage list runningvms | grep $VBOX_VMNAME`" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
# xwininfo -display $VBOX_DISPLAY -name "$VBOX_VMNAME - Oracle VM VirtualBox" 2>/dev/null |grep "Window id:"| sed "s|.*Window id: \([0-9a-fx]*\).*|\1|"
|
|
||||||
# [ "$WINID" ] && break
|
|
||||||
sleep 1
|
sleep 1
|
||||||
if [ $sleepcnt -gt 20 ]; then
|
if [ $sleepcnt -gt 20 ]; then
|
||||||
echo "VirtualBox did not start; aborting."
|
echo "VirtualBox did not start; aborting."
|
||||||
@ -148,10 +143,9 @@ if [ ! "$VIEWMODE" ]; then
|
|||||||
|
|
||||||
if [ ! "$RECREATE_IMAGES" ]; then
|
if [ ! "$RECREATE_IMAGES" ]; then
|
||||||
echo "Creating ${VIDEO_EXT2} video from ${VIDEO_EXT}"
|
echo "Creating ${VIDEO_EXT2} video from ${VIDEO_EXT}"
|
||||||
#ffmpeg -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2} >/dev/null
|
|
||||||
ffmpeg2theora -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2} >/dev/null
|
ffmpeg2theora -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2} >/dev/null
|
||||||
|
|
||||||
#cleanup old files
|
# cleanup old files
|
||||||
for f in `ls $ISO_DIR/preview/*${VIDEO_EXT}`; do
|
for f in `ls $ISO_DIR/preview/*${VIDEO_EXT}`; do
|
||||||
[ "$f" = "$ISO_DIR/preview/$ISO_NAME${VIDEO_EXT}" ] || rm -f $f
|
[ "$f" = "$ISO_DIR/preview/$ISO_NAME${VIDEO_EXT}" ] || rm -f $f
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user