-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-html-environment.command
More file actions
executable file
·47 lines (41 loc) · 1.03 KB
/
run-html-environment.command
File metadata and controls
executable file
·47 lines (41 loc) · 1.03 KB
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
##
## Hedderik van Rijn, ACT-R OS X startup script
##
## Modified by Dan Bothell to make it a .command file
## and have it change the terminal's title directly
## which removes the need for the separate .term file
## and lets the ACT-R files run from anywhere instead
## of requiring they be in Applications.
##
## Path discovery code based on:
##
## From: Ashwin Baskaran (no_spam@cisco.com)
## Subject: Re: Extracting the location of a script from its invocation
## Newsgroups: comp.unix.shell
## Date: 2001-09-19 10:45:58 PST
##
mypath=${0-.}
if expr "${mypath}" : '.*/.*' > /dev/null
then
:
else
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH
do
test -z "$dir" && dir=.
if test -x "$dir/$mypath"
then
mypath=$dir/$mypath
break
fi
done
IFS="$save_ifs"
fi
execpath=`echo "${mypath}" | sed -e 's@/[^/]*$@@'`
cd "$execpath"
## Change the terminal's title
echo -n -e "\033]0;ACT-R HTML Environment Relay\007"
cd apps
## Run the included application
./html-environment-linux