Use only mktemp -d, as it is near-impossible to get mktemp to create a file with a suffix (extension) on macos
This commit is contained in:
parent
cea641936a
commit
532140f5fc
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
/build/bochscontinue
|
||||||
|
/build/bochsrc
|
||||||
/build/check_makefile
|
/build/check_makefile
|
||||||
/build/check_makefile_targets
|
/build/check_makefile_targets
|
||||||
/build/check_makefile_w_arnings
|
/build/check_makefile_w_arnings
|
||||||
|
@ -95,6 +97,8 @@
|
||||||
/build/test_pass/noemu_zip
|
/build/test_pass/noemu_zip
|
||||||
/build/test_pass/sudo_fat12_mount
|
/build/test_pass/sudo_fat12_mount
|
||||||
/build/test_pass/sudo_iso_mount
|
/build/test_pass/sudo_iso_mount
|
||||||
|
/build/twm_cfg
|
||||||
|
/build/virtualbox.img
|
||||||
/deploy-screenshots/bochs-anim.gif
|
/deploy-screenshots/bochs-anim.gif
|
||||||
/deploy-screenshots/bochs.png
|
/deploy-screenshots/bochs.png
|
||||||
/deploy-screenshots/dosbox-anim.gif
|
/deploy-screenshots/dosbox-anim.gif
|
||||||
|
|
26
Makefile
26
Makefile
|
@ -71,6 +71,10 @@ built_files = ${os_filename} \
|
||||||
build/os.hex_with_offsets \
|
build/os.hex_with_offsets \
|
||||||
build/iso_files/os.zip \
|
build/iso_files/os.zip \
|
||||||
build/iso_files/boot/iso_boot.sys \
|
build/iso_files/boot/iso_boot.sys \
|
||||||
|
build/bochsrc \
|
||||||
|
build/bochscontinue \
|
||||||
|
build/twm_cfg \
|
||||||
|
build/virtualbox.img \
|
||||||
${more_offset_dec} \
|
${more_offset_dec} \
|
||||||
${more_offset_hex} \
|
${more_offset_hex} \
|
||||||
${tests_emu:test/%=build/test_pass/emu_%} \
|
${tests_emu:test/%=build/test_pass/emu_%} \
|
||||||
|
@ -348,6 +352,7 @@ ${tests_emu}: build/test_pass/emu_$$(@F)
|
||||||
|
|
||||||
build/test_pass/emu_% deploy-screenshots/%.png deploy-screenshots/%-anim.gif: \
|
build/test_pass/emu_% deploy-screenshots/%.png deploy-screenshots/%-anim.gif: \
|
||||||
${os_filename} \
|
${os_filename} \
|
||||||
|
build/checkerboard_800x600.xbm \
|
||||||
utils/gui-wrapper.sh utils/ansi-screenshots/ansi_screenshot.sh utils/ansi-screenshots/to_ansi.sh \
|
utils/gui-wrapper.sh utils/ansi-screenshots/ansi_screenshot.sh utils/ansi-screenshots/to_ansi.sh \
|
||||||
test/%.sh \
|
test/%.sh \
|
||||||
build/check_makefile \
|
build/check_makefile \
|
||||||
|
@ -405,10 +410,29 @@ test/macos-sh-x11:
|
||||||
screencapture deploy-screenshots/macos-sh-x11-screencapture.png
|
screencapture deploy-screenshots/macos-sh-x11-screencapture.png
|
||||||
|
|
||||||
.PHONY: test/macos-sh
|
.PHONY: test/macos-sh
|
||||||
test/macos-sh: build/check_makefile | deploy-screenshots
|
test/macos-sh: build/check_makefile \
|
||||||
|
build/checkerboard_1024x768.png \
|
||||||
|
| deploy-screenshots
|
||||||
osascript -e 'tell app "Terminal" to activate'
|
osascript -e 'tell app "Terminal" to activate'
|
||||||
osascript -e 'tell app "Terminal" to do script "'"$$PWD"'/os.bat"'
|
osascript -e 'tell app "Terminal" to do script "'"$$PWD"'/os.bat"'
|
||||||
sleep 5
|
sleep 5
|
||||||
screencapture deploy-screenshots/screencapture-os-bat.png
|
screencapture deploy-screenshots/screencapture-os-bat.png
|
||||||
|
|
||||||
# See https://wiki.osdev.org/EFI#Emulation to emulate an UEFI system with qemu, to test the EFI boot from hdd / cd / fd (?).
|
# See https://wiki.osdev.org/EFI#Emulation to emulate an UEFI system with qemu, to test the EFI boot from hdd / cd / fd (?).
|
||||||
|
|
||||||
|
# Create checkerboard background
|
||||||
|
build/checkerboard_%.png: build/check_makefile
|
||||||
|
convert -size "$*" \
|
||||||
|
tile:pattern:checkerboard \
|
||||||
|
-auto-level +level-colors 'gray(192),gray(128)' \
|
||||||
|
$@
|
||||||
|
|
||||||
|
build/checkerboard_%.xbm: build/check_makefile
|
||||||
|
convert -size "$*" \
|
||||||
|
tile:pattern:checkerboard \
|
||||||
|
-auto-level \
|
||||||
|
$@
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
build/bochsrc build/bochscontinue build/twm_cfg build/virtualbox.img:
|
||||||
|
touch $@
|
||||||
|
|
|
@ -6,17 +6,15 @@ if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then
|
||||||
fi
|
fi
|
||||||
os_filename="$1"
|
os_filename="$1"
|
||||||
|
|
||||||
bochsrc="$(./utils/mktemp.sh)"
|
cat > "build/bochsrc" <<EOF
|
||||||
cat > "$bochsrc" <<EOF
|
|
||||||
floppya: 1_44=${os_filename}, status=inserted
|
floppya: 1_44=${os_filename}, status=inserted
|
||||||
boot: floppy
|
boot: floppy
|
||||||
display_library: sdl
|
display_library: sdl
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
bochscontinue="$(./utils/mktemp.sh)"
|
echo "continue" > "build/bochscontinue"
|
||||||
echo "continue" > "$bochscontinue"
|
|
||||||
|
|
||||||
bochs -qf "$bochsrc" < "$bochscontinue" &
|
bochs -qf "build/bochsrc" < "build/bochscontinue" &
|
||||||
pid=$!
|
pid=$!
|
||||||
runsikulix -r test/check-gradient.sikuli && exitcode=$? || exitcode=$?
|
runsikulix -r test/check-gradient.sikuli && exitcode=$? || exitcode=$?
|
||||||
|
|
||||||
|
@ -24,6 +22,4 @@ runsikulix -r test/check-gradient.sikuli && exitcode=$? || exitcode=$?
|
||||||
|
|
||||||
kill $pid
|
kill $pid
|
||||||
|
|
||||||
rm "${bochsrc}" "${bochscontinue}"
|
|
||||||
|
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
|
|
@ -6,17 +6,16 @@ if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then
|
||||||
fi
|
fi
|
||||||
os_filename="$1"
|
os_filename="$1"
|
||||||
|
|
||||||
img_file="$(./utils/mktemp.sh .img)"
|
vbox_dir="$(./utils/mktemp.sh -d)"
|
||||||
vbox_dir="$(./utils/mktemp.sh -d .vbox)"
|
|
||||||
vmname="automatic-os-test-$(date +%s)-$$"
|
vmname="automatic-os-test-$(date +%s)-$$"
|
||||||
|
|
||||||
ln -sf "$(readlink -f "$os_filename")" "$img_file"
|
ln -sf "$(readlink -f "$os_filename")" "build/virtualbox.img"
|
||||||
VBoxManage createvm --name "$vmname" --register --basefolder "$vbox_dir"
|
VBoxManage createvm --name "$vmname" --register --basefolder "$vbox_dir"
|
||||||
VBoxManage modifyvm "$vmname" --hwvirtex off
|
VBoxManage modifyvm "$vmname" --hwvirtex off
|
||||||
VBoxManage modifyvm "$vmname" --nestedpaging off
|
VBoxManage modifyvm "$vmname" --nestedpaging off
|
||||||
VBoxManage modifyvm "$vmname" --pae off
|
VBoxManage modifyvm "$vmname" --pae off
|
||||||
VBoxManage storagectl "$vmname" --name 'floppy disk drive' --add floppy --bootable on
|
VBoxManage storagectl "$vmname" --name 'floppy disk drive' --add floppy --bootable on
|
||||||
VBoxManage storageattach "$vmname" --storagectl 'floppy disk drive' --port 0 --device 0 --type fdd --medium "$img_file"
|
VBoxManage storageattach "$vmname" --storagectl 'floppy disk drive' --port 0 --device 0 --type fdd --medium "build/virtualbox.img"
|
||||||
VBoxManage modifyvm "$vmname" --boot1 floppy
|
VBoxManage modifyvm "$vmname" --boot1 floppy
|
||||||
VBoxManage startvm "$vmname" --type sdl &
|
VBoxManage startvm "$vmname" --type sdl &
|
||||||
pid=$!
|
pid=$!
|
||||||
|
@ -35,7 +34,6 @@ for i in `seq 10`; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Cleanup: remove temporary files and directories.
|
# Cleanup: remove temporary files and directories.
|
||||||
rm "$img_file"
|
|
||||||
rm "/tmp/$vbox_dir" -fr
|
rm "/tmp/$vbox_dir" -fr
|
||||||
|
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
|
|
@ -2,9 +2,4 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
screenshot="$("$(dirname "$0")/../mktemp.sh" .png)"
|
import -window root png:- | "$(dirname "$0")/to_ansi.sh" png:- 128
|
||||||
|
|
||||||
scrot "$screenshot"
|
|
||||||
"$(dirname "$0")/to_ansi.sh" "$screenshot" 128
|
|
||||||
|
|
||||||
rm "$screenshot"
|
|
||||||
|
|
|
@ -5,15 +5,6 @@ set -e
|
||||||
file="$1"
|
file="$1"
|
||||||
width="$2"
|
width="$2"
|
||||||
|
|
||||||
mini_png="$("$(dirname "$0")/../mktemp.sh" .png)"
|
|
||||||
colors_gif="$("$(dirname "$0")/../mktemp.sh" .gif)"
|
|
||||||
indexed_gif="$("$(dirname "$0")/../mktemp.sh" .gif)"
|
|
||||||
indexed_pgm="$("$(dirname "$0")/../mktemp.sh" .pgm)"
|
|
||||||
odd_lines="$("$(dirname "$0")/../mktemp.sh" .odd)"
|
|
||||||
even_lines="$("$(dirname "$0")/../mktemp.sh" .even)"
|
|
||||||
odd_lines_px="$("$(dirname "$0")/../mktemp.sh" .odd.px)"
|
|
||||||
even_lines_px="$("$(dirname "$0")/../mktemp.sh" .even.px)"
|
|
||||||
|
|
||||||
colors=(78,78,78 255,108,96 0,170,0 288,288,182 150,203,254 255,115,253 85,255,255 238,238,238 124,124,124 255,155,147 177,253,121 255,255,145 181,220,254 255,156,254 85,255,255 255,255,255)
|
colors=(78,78,78 255,108,96 0,170,0 288,288,182 150,203,254 255,115,253 85,255,255 238,238,238 124,124,124 255,155,147 177,253,121 255,255,145 181,220,254 255,156,254 85,255,255 255,255,255)
|
||||||
args=()
|
args=()
|
||||||
for i in `seq 0 15`; do
|
for i in `seq 0 15`; do
|
||||||
|
@ -25,24 +16,17 @@ for i in `seq 0 15`; do
|
||||||
args+=(-fuzz 0% -fill "gray(${color})" -opaque "rgb(${colors[$i]})")
|
args+=(-fuzz 0% -fill "gray(${color})" -opaque "rgb(${colors[$i]})")
|
||||||
done
|
done
|
||||||
|
|
||||||
convert "$file" -resize "${width}x" "${mini_png}" \
|
convert "$file" -resize "${width}x" png:- \
|
||||||
&& convert +dither -remap "$(dirname "$0")/travis-palette.gif" "${mini_png}" "${colors_gif}" \
|
| convert +dither -remap "$(dirname "$0")/travis-palette.gif" png:- gif:- \
|
||||||
&& convert "${colors_gif}" "${args[@]}" "${indexed_gif}" \
|
| convert gif:- "${args[@]}" gif:- \
|
||||||
&& convert "${indexed_gif}" "${indexed_pgm}" \
|
| convert gif:- pgm:- \
|
||||||
&& tail -n +4 "${indexed_pgm}" \
|
| tail -n +4 \
|
||||||
| hexdump -Cv \
|
| hexdump -Cv \
|
||||||
| sed -n -e 's/^[0-9a-f]* \(\([0-9a-f]\{2\} \?\)\{1,16\}\).*$/\1/p' \
|
| sed -n -e 's/^[0-9a-f]* \(\([0-9a-f]\{2\} \?\)\{1,16\}\).*$/\1/p' \
|
||||||
| tr '\n' ' ' \
|
| tr '\n' ' ' \
|
||||||
| sed -e 's/ \+/ /g' \
|
| sed -e 's/ \+/ /g' \
|
||||||
| fold -w $((width*3)) \
|
| fold -w $((width*3)) \
|
||||||
| awk "{ if (NR % 2 == 0) print > \"$even_lines\"; else print > \"$odd_lines\"; }"
|
| while read a && read b; do for i in $a; do echo -n "$i ${b%% *} "; b="${b#* }"; done; echo; done \
|
||||||
nodd="$($(dirname "$0")/../file-length.sh -l "$odd_lines")"
|
|
||||||
neven="$($(dirname "$0")/../file-length.sh -l "$even_lines")"
|
|
||||||
if test "$nodd" -gt "$neven"; then nlines="$neven"; else nlines="$nodd"; fi
|
|
||||||
head -n "$nlines" "$odd_lines" | sed -e 's/ $//' | tr ' ' '\n' > "$odd_lines_px"
|
|
||||||
head -n "$nlines" "$even_lines" | sed -e 's/ $//' | tr ' ' '\n' > "$even_lines_px"
|
|
||||||
paste "$odd_lines_px" "$even_lines_px" \
|
|
||||||
| tr '\t\n' ' ' \
|
|
||||||
| fold -w $((width*6)) \
|
| fold -w $((width*6)) \
|
||||||
| sed -e 's/\([01]\)\([0-7]\) \([01]\)\([0-7]\) /[\1;3\2;4\4m▀/g' -e 's/$/[m/' \
|
| sed -e 's/\([01]\)\([0-7]\) \([01]\)\([0-7]\) /[\1;3\2;4\4m▀/g' -e 's/$/[m/' \
|
||||||
| if test "$CI" = "true" -a "$TRAVIS" = "true"; then sed -e 's/▀/"/g'; else cat; fi
|
| if test "$CI" = "true" -a "$TRAVIS" = "true"; then sed -e 's/▀/"/g'; else cat; fi
|
||||||
|
@ -52,5 +36,3 @@ paste "$odd_lines_px" "$even_lines_px" \
|
||||||
# | if test "$CI" = "true" -a "$TRAVIS" = "true"; then while IFS=$'\n' read -n 11 ab; do if test "${#ab}" -ne 11; then echo "$ab"; else echo -n "$ab"; fi; sleep 0.01; done; else cat; fi
|
# | if test "$CI" = "true" -a "$TRAVIS" = "true"; then while IFS=$'\n' read -n 11 ab; do if test "${#ab}" -ne 11; then echo "$ab"; else echo -n "$ab"; fi; sleep 0.01; done; else cat; fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
rm "${mini_png}" "${colors_gif}" "${indexed_gif}" "${indexed_pgm}" "${odd_lines}" "${even_lines}" "${odd_lines_px}" "${even_lines_px}"
|
|
||||||
|
|
||||||
|
|
|
@ -59,26 +59,25 @@ else
|
||||||
echo "Error while decrypting key."
|
echo "Error while decrypting key."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# TODO: all the config should be in a separate folder, instead of using ~/.ssh for the id_rsa.
|
||||||
mv travis-deploy-key-id_rsa ~/.ssh/travis-deploy-key-id_rsa
|
mv travis-deploy-key-id_rsa ~/.ssh/travis-deploy-key-id_rsa
|
||||||
chmod 600 ~/.ssh/travis-deploy-key-id_rsa
|
chmod 600 ~/.ssh/travis-deploy-key-id_rsa
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
ssh-add ~/.ssh/travis-deploy-key-id_rsa
|
ssh-add ~/.ssh/travis-deploy-key-id_rsa
|
||||||
# TODO: all the config should be in a separate folder, instead of using ~/.ssh for the id_rsa.
|
|
||||||
|
|
||||||
known_hosts_d="$(UMASK=077 "$(dirname "$0")/mktemp.sh" -d)"
|
travis_known_hosts="$(realpath "$(dirname "$0")/travis_known_hosts")"
|
||||||
touch ${known_hosts_d}/known_hosts
|
chmod 600 "$travis_known_hosts"
|
||||||
chmod 600 ${known_hosts_d}/known_hosts
|
echo "$travis_known_hosts"
|
||||||
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> "${known_hosts_d}/known_hosts"
|
cat "$travis_known_hosts"
|
||||||
|
ssh -o UserKnownHostsFile=$travis_known_hosts git@github.com || true
|
||||||
|
|
||||||
TRAVIS_AUTO_PUSH_REPO_DIR="$HOME/travis-temp-auto-push-$(date +%s)"
|
TRAVIS_AUTO_PUSH_REPO_DIR="$HOME/travis-temp-auto-push-$(date +%s)"
|
||||||
if test -e "$TRAVIS_AUTO_PUSH_REPO_DIR"; then rm -rf "$TRAVIS_AUTO_PUSH_REPO_DIR"; fi
|
if test -e "$TRAVIS_AUTO_PUSH_REPO_DIR"; then rm -rf "$TRAVIS_AUTO_PUSH_REPO_DIR"; fi
|
||||||
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=${known_hosts_d}/known_hosts" git clone -b "$deploy_base_commit" --depth 1 --shallow-submodules "$deploy_repo" "$TRAVIS_AUTO_PUSH_REPO_DIR"
|
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=$travis_known_hosts" git clone -b "$deploy_base_commit" --depth 1 --shallow-submodules "$deploy_repo" "$TRAVIS_AUTO_PUSH_REPO_DIR"
|
||||||
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git checkout -b "$deploy_branch")
|
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git checkout -b "$deploy_branch")
|
||||||
rsync -a "${deploy_directory}/" "${TRAVIS_AUTO_PUSH_REPO_DIR}/"
|
rsync -a "${deploy_directory}/" "${TRAVIS_AUTO_PUSH_REPO_DIR}/"
|
||||||
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git add -A . && git commit --allow-empty -m "Auto-publish to $deploy_branch") > commit.log || (cat commit.log && exit 1)
|
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git add -A . && git commit --allow-empty -m "Auto-publish to $deploy_branch") > commit.log || (cat commit.log && exit 1)
|
||||||
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git log --oneline --decorate --graph -10)
|
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && git log --oneline --decorate --graph -10)
|
||||||
echo '(cd '"$TRAVIS_AUTO_PUSH_REPO_DIR"' && git push --force --quiet "'"$deploy_repo"'" "'"$deploy_branch"'")'
|
echo '(cd '"$TRAVIS_AUTO_PUSH_REPO_DIR"' && git push --force --quiet "'"$deploy_repo"'" "'"$deploy_branch"'")'
|
||||||
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=${known_hosts_d}/known_hosts" git push --force --quiet "$deploy_repo" "$deploy_branch" >/dev/null 2>&1) >/dev/null 2>&1 # redirect to /dev/null to avoid showing credentials.
|
(cd "$TRAVIS_AUTO_PUSH_REPO_DIR" && GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=$travis_known_hosts" git push --force --quiet "$deploy_repo" "$deploy_branch" >/dev/null 2>&1) >/dev/null 2>&1 # redirect to /dev/null to avoid showing credentials.
|
||||||
# Cleanup:
|
|
||||||
rm "${known_hosts_d}/known_hosts"
|
|
||||||
fi
|
fi
|
||||||
|
|
28
utils/gui-wrapper-mac.sh
Executable file
28
utils/gui-wrapper-mac.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
resolution="$1" # e.g. 800x600x24 (width x height x bits_per_pixel)
|
||||||
|
shift # the following arguments are the program to execute and its arguments
|
||||||
|
|
||||||
|
bg="$(realpath "build/checkerboard_$(echo "$resolution" | cut -d 'x' -f1-2).png")"
|
||||||
|
anim="$(./utils/mktemp.sh -d)"
|
||||||
|
|
||||||
|
echo "$anim $resolution $@"
|
||||||
|
sleep 2
|
||||||
|
osascript -e "tell application \"Finder\" to set desktop picture to (POSIX file \"$bg\")" \
|
||||||
|
|| osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"$bg\""
|
||||||
|
sleep 1
|
||||||
|
./utils/screenshots-loop.sh mac "$anim" &
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
touch "$anim/stop-screenshots"
|
||||||
|
anim_done=false
|
||||||
|
for i in `seq 300`; do if test -e "$anim/anim-done"; then anim_done=true; break; fi; sleep 1; done
|
||||||
|
if $anim_done; then echo "anim: done ($*)"; else echo "anim: timeout ($*)"; fi
|
||||||
|
if test -e "$anim/anim.gif"; then
|
||||||
|
mv "$anim/anim.gif" "./deploy-screenshots/$(basename "$1" .sh)-anim.gif"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
rm -r -- "$anim"
|
|
@ -5,8 +5,7 @@ set -e
|
||||||
resolution="$1" # e.g. 800x600x24 (width x height x bits_per_pixel)
|
resolution="$1" # e.g. 800x600x24 (width x height x bits_per_pixel)
|
||||||
shift # the following arguments are the program to execute and its arguments
|
shift # the following arguments are the program to execute and its arguments
|
||||||
|
|
||||||
bg="$(./utils/mktemp.sh .xbm)"
|
bg="build/checkerboard_$(echo "$resolution" | cut -d 'x' -f1-2).xbm"
|
||||||
twm_cfg="$(./utils/mktemp.sh .twm.cfg)"
|
|
||||||
twm_session_dir="$(./utils/mktemp.sh -d)"
|
twm_session_dir="$(./utils/mktemp.sh -d)"
|
||||||
anim="$(./utils/mktemp.sh -d)"
|
anim="$(./utils/mktemp.sh -d)"
|
||||||
|
|
||||||
|
@ -19,13 +18,13 @@ convert -size "$(echo "$resolution" | cut -d 'x' -f1-2)" \
|
||||||
-auto-level \
|
-auto-level \
|
||||||
"$bg"
|
"$bg"
|
||||||
|
|
||||||
cat > "$twm_cfg" <<EOF
|
cat > "build/twm_cfg" <<EOF
|
||||||
RandomPlacement
|
RandomPlacement
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$bg $twm_cfg $anim $resolution $@"
|
echo "$bg $anim $resolution $@"
|
||||||
# -fg chocolate -bg coral looks nice too :)
|
# -fg chocolate -bg coral looks nice too :)
|
||||||
xvfb-run -a --server-args="-screen 0 ${resolution}" sh -c 'sleep 2; SM_SAVE_DIR="'"$twm_session_dir"'" twm -f "'"$twm_cfg"'" & sleep 1 && xsetroot -bitmap "'"$bg"'" -fg gray75 -bg gray50 && sleep 1 && utils/screenshots-loop.sh "'"$anim"'" & "$@"' utils/gui-wrapper.sh-subshell "$@"
|
xvfb-run -a --server-args="-screen 0 ${resolution}" sh -c 'sleep 2; SM_SAVE_DIR="'"$twm_session_dir"'" twm -f "'"build/twm_cfg"'" & sleep 1 && xsetroot -bitmap "'"$bg"'" -fg gray75 -bg gray50 && sleep 1 && ./utils/screenshots-loop.sh x11 "'"$anim"'" & "$@"' ./utils/gui-wrapper.sh-subshell "$@"
|
||||||
|
|
||||||
touch "$anim/stop-screenshots"
|
touch "$anim/stop-screenshots"
|
||||||
anim_done=false
|
anim_done=false
|
||||||
|
@ -36,5 +35,4 @@ if test -e "$anim/anim.gif"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm -- "$bg" "$twm_cfg"
|
|
||||||
rm -r -- "$twm_session_dir" "$anim"
|
rm -r -- "$twm_session_dir" "$anim"
|
||||||
|
|
|
@ -36,7 +36,7 @@ if ! which travis > /dev/null; then
|
||||||
gem install travis || echo "Notice: you need the following packages or their equivalent: ruby ruby-dev"
|
gem install travis || echo "Notice: you need the following packages or their equivalent: ruby ruby-dev"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ssh_dir="$("$(dirname "$0")/mktemp.sh" -d tmp.XXXXXXXXXX_travis-deploy-ssh-keygen)"
|
ssh_dir="$("$(dirname "$0")/mktemp.sh" -d)"
|
||||||
mkdir -m 700 "${ssh_dir}/permissions/"
|
mkdir -m 700 "${ssh_dir}/permissions/"
|
||||||
ssh-keygen -N '' -f "${ssh_dir}/permissions/travis-deploy-key-id_rsa"
|
ssh-keygen -N '' -f "${ssh_dir}/permissions/travis-deploy-key-id_rsa"
|
||||||
|
|
||||||
|
|
|
@ -11,16 +11,12 @@ else
|
||||||
mkdir_opt=''
|
mkdir_opt=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $# -gt 1; then
|
if test $# -gt 0; then
|
||||||
echo "Usage: $0 [-d] .suffix" >&2
|
echo "Usage: $0 [-d]" >&2
|
||||||
exit 1
|
exit 1
|
||||||
elif test $# -eq 1; then
|
|
||||||
suffix="$1"
|
|
||||||
else
|
|
||||||
suffix=''
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
result="$(mktemp $mkdir_opt "${the_tmp_dir}tmp.XXXXXXXXXX$suffix")"
|
result="$(mktemp $mkdir_opt "${the_tmp_dir}/tmp.XXXXXXXXXX")"
|
||||||
|
|
||||||
# Sanity checks:
|
# Sanity checks:
|
||||||
|
|
||||||
|
|
1
utils/travis_known_hosts
Normal file
1
utils/travis_known_hosts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
Loading…
Reference in New Issue
Block a user