-
Notifications
You must be signed in to change notification settings - Fork 29
/
wrapper.sh
executable file
·25 lines (19 loc) · 699 Bytes
/
wrapper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#Send parameters to this script, conversion will be attempted on all before building application.bat. First parameter will be a UUID however, and will not be passed to VM.
#Import ubiquitous_bash.
. ubiquitous_bash.sh
scriptLocation="$(getScriptAbsoluteFolder)"
InstanceDirUUID=$1
shift
InstanceDir=/tmp/IQemu/$InstanceDirUUID
preCommand=$(cat "$scriptLocation"/preCommand)
echo -n "start $preCommand" > "$InstanceDir"/hostToGuest/files/application.bat
while (($#))
do
echo -n \"$("$scriptLocation/win-nix_param_converter.sh" "$1")\" >> "$InstanceDir"/hostToGuest/files/application.bat
shift
if (($#))
then
echo -n " " >> "$InstanceDir"/hostToGuest/files/application.bat
fi
done