macos does not have readlink command, but has realpath
This commit is contained in:
parent
75fbb89c07
commit
b467608409
|
@ -9,7 +9,7 @@ os_filename="$1"
|
||||||
vbox_dir="$(./utils/mktemp.sh -d)"
|
vbox_dir="$(./utils/mktemp.sh -d)"
|
||||||
vmname="automatic-os-test-$(date +%s)-$$"
|
vmname="automatic-os-test-$(date +%s)-$$"
|
||||||
|
|
||||||
ln -sf "$(readlink -f "$os_filename")" "build/virtualbox.img"
|
ln -sf "$(./utils/absolute-path.sh "$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
|
||||||
|
|
12
utils/absolute-path.sh
Executable file
12
utils/absolute-path.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if test $# -ne 1 || test "$1" = "-h" -o "$1" = "--help"; then
|
||||||
|
echo "Usage: $0 [/]absolute/or/relative/path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
/*) echo "$1";;
|
||||||
|
*) echo "$PWD/$1";;
|
||||||
|
esac
|
|
@ -65,7 +65,7 @@ else
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
ssh-add ~/.ssh/travis-deploy-key-id_rsa
|
ssh-add ~/.ssh/travis-deploy-key-id_rsa
|
||||||
|
|
||||||
travis_known_hosts="$(realpath "$(dirname "$0")/travis_known_hosts")"
|
travis_known_hosts="$("$(dirname "$0")/absolute-path.sh" "$(dirname "$0")/travis_known_hosts")"
|
||||||
chmod 600 "$travis_known_hosts"
|
chmod 600 "$travis_known_hosts"
|
||||||
echo "$travis_known_hosts"
|
echo "$travis_known_hosts"
|
||||||
cat "$travis_known_hosts"
|
cat "$travis_known_hosts"
|
||||||
|
|
|
@ -5,7 +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="$(realpath "build/checkerboard_$(echo "$resolution" | cut -d 'x' -f1-2).png")"
|
bg="$(./utils/absolute-path.sh "build/checkerboard_$(echo "$resolution" | cut -d 'x' -f1-2).png")"
|
||||||
anim="$(./utils/mktemp.sh -d)"
|
anim="$(./utils/mktemp.sh -d)"
|
||||||
|
|
||||||
echo "$anim $resolution $@"
|
echo "$anim $resolution $@"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user