makedist-recordvm: minor code cleanups

This commit is contained in:
Silvan Calarco 2012-11-29 12:27:01 +01:00
parent a0111bad1c
commit 3f64d62ed3

View File

@ -64,9 +64,6 @@ if [ ! "$RECREATE_IMAGES" ]; then
xinit -- $VBOX_DISPLAY &
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
sleepcnt=0
@ -74,8 +71,6 @@ if [ ! "$RECREATE_IMAGES" ]; then
if [ "`VBoxManage list runningvms | grep $VBOX_VMNAME`" ]; then
break
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
if [ $sleepcnt -gt 20 ]; then
echo "VirtualBox did not start; aborting."
@ -148,10 +143,9 @@ if [ ! "$VIEWMODE" ]; then
if [ ! "$RECREATE_IMAGES" ]; then
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
#cleanup old files
# cleanup old files
for f in `ls $ISO_DIR/preview/*${VIDEO_EXT}`; do
[ "$f" = "$ISO_DIR/preview/$ISO_NAME${VIDEO_EXT}" ] || rm -f $f
done