source: other-projects/expeditee-release-kits/shared/windows/installer-classes/com/orangevolt/tools/ant/stub.sh@ 28740

Last change on this file since 28740 was 28740, checked in by ak19, 10 years ago

Expeditee team (jts21). Add shared/windows folder with self-extracting Java 8 JRE, moved windows_wrapper.cpp to shared/windows/wrapper/wrapper.cpp, fixed run/findjava scripts

File size: 1.2 KB
Line 
1#!/bin/sh
2#
3# Copyright 2005 Orangevolt (www.orangevolt.com)
4
5abs_file()
6{
7 FIRST_CHAR=`echo $1 | cut -c1`
8 if [ "${FIRST_CHAR}" = "/" ]
9 then
10 absolutepath=$1
11 else
12 PWD=`pwd`
13 absolutepath="${PWD}/$1"
14 fi
15}
16
17get_abs_file()
18{
19 abs_file $1
20 if [ -L "$absolutepath" ]; then
21 absolutepath=`ls -l $absolutepath | cut -d\> -f2`
22 abs_file $absolutepath
23# echo "File is a link: $absolutepath"
24 get_abs_file $absolutepath
25# else
26# echo "File is not a link: $absolutepath"
27 fi
28}
29
30get_abs_file $0
31
32# now absolutepath is valid
33#echo $absolutepath
34
35path=${absolutepath%/*}
36# now path is valid
37#echo $path
38
39absolutename=${absolutepath##*/}
40# now absolutepath is valid
41#echo $absolutename
42
43name=${absolutename%%.*}
44# now name is valid
45#echo $name
46
47exe="__EXECUTABLE__NAME__"
48path="__EXECUTABLE__PATH__"
49
50if [ ! -d "/tmp/$absolutename" ]
51then
52 mkdir /tmp/$absolutename
53fi
54unzip -o -qq $0 -d /tmp/$absolutename >/dev/null 2>&1
55
56echo "cd /tmp/$absolutename$path"
57cd /tmp/$absolutename$path
58#chmod 755 $exe
59#echo "$exe $@"
60$exe $@
61
62exit 0
63##### zipped content starts here ####
Note: See TracBrowser for help on using the repository browser.