blob: 68d571070fae21a27010e7ec9aca3ccd9616f027 (
plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
# Author: Bert Freudenberg
# Purpose: This version of etoys-activity is called only under
# new (post-Trial-3) Sugar. There is another one in the
# bundle's root directory called under old Sugar.
echo "$0" "$@"
echo
# arguments are unordered, have to loop
args=""
while [ -n "$2" ] ; do
case "$1" in
-b | --bundle-id) bundle_id="$2" ; args="$args BUNDLE_ID $2" ;;
-a | --activity-id) activity_id="$2" ; args="$args ACTIVITY_ID $2";;
-o | --object-id) object_id="$2" ; args="$args OBJECT_ID $2";;
-u | --uri) uri="$2" ; args="$args URI $2";;
*) echo unknown argument $1 $2 ;;
esac
shift;shift
done
# really need bundle id and activity id
if [ -z "$bundle_id" -o -z "$activity_id" ] ; then
echo ERROR: bundle-id and activity-id arguments required
echo Aborting
exit 1
fi
# some debug output
echo launching $bundle_id instance $activity_id
[ -n "$object_id" ] && echo with journal obj $object_id
[ -n "$uri" ] && echo loading uri $uri
echo
[ -z "$SUGAR_PROFILE" ] && SUGAR_PROFILE=default
etoysdir="$HOME/.sugar/$SUGAR_PROFILE/etoys"
export SQUEAK_SECUREDIR="$etoysdir/private"
export SQUEAK_USERDIR="$etoysdir/sandbox"
# now run Squeak VM with Etoys image
exec etoys \
-sugarBundleId $bundle_id \
-sugarActivityId $activity_id \
$args
|