各位大大好: $ a+ ^* ]9 L( K3 N# E3 }9 |. x- v( P 小弟執行nanosim時,卻無法跑出視窗來,有個錯誤可是我不清楚該如何解決?問題如下) |2 k( ?, D( t0 L9 H2 Z
[: 113: 64: unexpected operator& g0 G/ ^; M5 H
/opt/EDA/nanosim/cur/linux/ns/bin//scripts/nanosim: 1: Syntax error: Unterminated quoted string& d. B! s+ I, C4 K" l/ c
有大大遇過這方面的問題或是指導我方向去解決, 謝謝. 8 c: Q+ J5 o4 S+ G; O8 j我在猜可能是這個檔案內的文字需要修改 但不知道該如何修改? 6 ~. u" X! j) w _* ]以下為/opt/EDA/nanosim/cur/linux/ns/bin//scripts/nanosim 的檔案內容:% K! ` Y$ T& h4 e* B V
#!/bin/sh % D; z' t5 @1 K" `6 l4 k2 O$ t#* W0 v1 _4 X- I! ]
# Copyright (C) 2001 Synopsys INC ' @1 |( m1 d/ ]: p% [8 i# EPIC Dynamic Simulation Wrapper (DSW)8 N n; U% b$ X8 N. y* I8 X
#' A" e) C6 K9 t
eval ${DBG_EPIC_WRAPPER:+"set -x"}% B- a: v6 I/ N/ K% B
5 B. p; |3 ^5 y1 J6 B S2 w% Kif [ "$EPIC_WRAPPER_DVLP" = "" ]; then% g8 F& N i1 ~( M
TEMP_ARCH="$SES_ARCH" 9 o3 w/ H! E- p9 j% W6 ?2 F8 delse* d/ D- f( t1 V; Z% ^8 Q, N
TEMP_ARCH="$EPIC_ARCH"5 W6 ?) J- ^! ]0 c9 H; n5 S
fi8 Z% }, ]' y7 w _" _9 b1 y; n
8 o( N, i: l7 R& M a
scan_for_hva_args()* E }: G- v S, n7 @7 ^
{' R. s1 e$ J* G6 w2 ^
/bin/rm -f hva.init 1>&2, Y# A" T- f: [4 E
while [ $# -gt 0 ]; do4 ]$ {. g, y) y0 R8 i
case "$1" in% e! U& C. H! ?7 V. h& p1 k( |
-vaf) w9 k5 {6 q% b0 _# w3 @
have_vaf_flag=17 m! Z) o) h7 ?" A- P& q; O2 L. R
have_va_flag=0! k; U. c M% P0 f* ^* T
shift;# d8 z+ `2 J6 S/ C- I8 z1 L3 b
continue; $ A1 q# I- J+ d/ f" o" A4 Q7 D ;; 7 v. [& Z$ h8 R. [# r8 |' n& O -va) . A7 C+ J. b' R p) j have_va_flag=14 h8 y2 A. R* E6 H% E4 K/ O, Z
have_vaf_flag=0 & b* C) Z- p* A shift; % P# s) Q1 O' x2 n j continue;& C$ U8 k; O3 `4 r! H* `
;; 4 U5 V! q4 p7 {2 W+ j- d -*) 3 H" v; R3 y! @3 w ARGV="$ARGV $1"/ l: c5 c" X+ ]# S, V5 d& J' ?+ p6 e
have_va_flag=02 m4 q1 j+ b& a; ~2 h
have_vaf_flag=0 D3 R' @+ z& x7 x( _+ @ shift;7 O) N% y2 o$ f Q$ _. X1 H
continue;+ F, Z3 e/ @! O9 B8 ]
;;+ n3 ^: O4 L N& M. ]
*) / S! z4 R( z4 o if [ x"$have_va_flag" = x"1" ] ; then 1 }) O% q5 V% {% T* ^2 i
VA_FILE="$VA_FILE $1"- z( S; _' e4 y9 _! |8 |3 q% V
elif [ x"$have_vaf_flag" = x"1" ] ; then - g7 }! C& C. L7 K X="`cat $1 | sed -e '/\;/d;`" 3 m6 K* A G' X for token in ${X}; do( A M' r% a! n4 c4 f
VA_FILE="$VA_FILE $token"$ e) s' Q* q4 r! Z! Q" x$ X
done / N- f; e, V+ }- u+ w2 d
else7 _( A+ S' }6 y$ G; a
ARGV="$ARGV $1" 6 o: r$ A9 E: d5 p" O fi 5 J% q/ @' C0 u shift;3 B& B" z5 W' |4 n
;;& Y$ c& |% C" k$ Q- W0 D z9 `. O
esac / x2 U& l. c" O, x0 x$ K done2 b9 y+ ]1 C& | [, ` x
. @' q* d* ?4 u, U' U/ ?
if [ x"$VA_FILE" != x"" ] ; then % O: W/ A% x8 [) M# s## /bin/echo " xxx ARGV $ARGV" / p$ w4 f4 o4 f2 Q! E! Q, n /bin/echo "choose nanosim $ARGV ;" > hva.init1 {6 B3 a1 s) W; j. N7 D
echo vcs +ad=hva.init $VA_FILE -o simv( }3 c1 S! [) B
vcs +ad=hva.init $VA_FILE -o simv' O E7 [6 a7 S) ]
exe_status=$?9 S) @* ~: K9 m9 E E( {
if [ $exe_status != 100 ]; then 4 ] q4 p+ A9 N) { /bin/echo "" " m7 T) u, b$ Q. K /bin/echo "ERROR: Execution of vcs exited with code $exe_status" + b& T$ g/ B3 h. I6 y /bin/echo ""+ W$ X* E5 Q9 L$ v! J( E" Z; A( @
exit $exe_status 5 u3 G: P$ K Z fi& @ O; ?# ?8 [6 v: @. y# j6 t
hva_files="-n simv.daidir/amsVD.ntl simv.daidir/amsWRAP.spi"7 l2 u! |, u! l! C7 P$ [% y
ARGV="$ARGV $hva_files" 5 v" l; a" g& ?) t4 L9 c; M fi ; }; \% z7 e1 K# X$ p}# V" [/ |/ ]1 u* Y) n
#------------------------------------------------------------------------- . {' R% `9 E" ?( X' x ! V/ G1 r, O! K, |' n& X3 ecleanup()8 N* y( g7 ]: W# Z4 o4 M
{ , ]3 h* u9 p) u9 h) ?6 Z if [ -d "$rundir" ]; then 0 c" y5 q& S% g # On AIX, a .nfsXXX file is created if libModel.o is removed 9 N$ T- \+ n, Z1 b # so .epicrun is not removed because directory is not empty.4 D4 b+ \/ z; l; M
# Solution is to remove it again if the first rm failed ; [- }. i* c+ V # (rm -rf $rundir || rm -rf $rundir) 1> /dev/null 2>&1, P/ w: f; n' R$ T+ ~9 p4 R/ Y
if [ "$EXTRA_CAPACITY" = "YES" ]; then I. O/ R& |9 `# E" G' p/ U chmod u+x $rundir/rpcidfile ) `4 z* l1 L; P1 H# `" m, y2 ~ $rundir/rpcidfile9 z& f: g2 f! X. k3 h
rm $rundir/rpcidfile ]0 ^* _1 q+ W% N) Z
fi , N+ [9 ]( _0 D8 L) I8 q rm -rf $rundir . y* L1 P3 f/ ?5 a* j8 Z, A1 Q+ a$ ]* E1 o9 p
#Due to NFS problem, we have to copy files needed to: D+ v# A* i9 ?+ k. M/ Y
#/tmp/<temporary directory>, then symlink's files 4 R: ?# X; J" u. s. G6 U; f* p #to the local temporary 'rundir'. This avoids the problem & \: h! t i' ^& g/ |) }- g8 i; m #to remove 'rundir'' c2 {: _" W( F f0 [' A
if [ "$EPIC_ARCH" = "RS6000_AIX_4" -o "$EPIC_ARCH" = "RS6000_AIX_5" -o "$EPIC_ARCH" = "aix64" ]; then ' Z! m2 I2 Z1 Z if [ -d "$tdir" ]; then6 ? [7 L {2 Z" P$ u, ]
rm -rf $tdir) J# W' |4 a; {" w! ]3 \; @
fi ) ~# U# g3 e [" F1 e) ] fi4 O4 U4 E% S6 C
fi; J" G) |; |9 f. L; s
if [ ${exitstatus:-0} -eq $ld_err_code ]; then/ W' E2 K( [, B* u8 S7 D$ f
[ "$has_model" = "YES" ] && rm -f $cwd/libModel$suffix6 j, O: m- T# b: ^
[ "$has_custom" = "YES" ] && rm -f $cwd/libCustom$suffix2 R a3 e7 U0 U i" T" x% w9 n
fi! t5 b; Q h& v ]
[ -f "$EPIC_SCRIPT_MESSAGES_FILE" ] && rm -f $EPIC_SCRIPT_MESSAGES_FILE 1>&2 6 c- ^9 {. F. z: x5 H exit ${exitstatus:-0}3 j Y! v& a/ @
}8 g& e! j! w' m2 l# o3 A+ w2 u
/ P; X) {: a5 r% S
Exit() * t: }9 Y: n f7 K9 w7 j7 }" c{& y' E" o$ C# h! _
exitstatus=$1) k5 ]+ z, p2 n, L/ K
exit $exitstatus$ w( `: _$ F4 s; Y7 \
} O t& V+ d% C( D
8 j9 G6 A1 K N& W0 u6 i: j0 l/ Y8 T* z
# get_epicrc filename keyword2 W+ M( T* e5 i7 e3 i
get_epicrc() : d4 x, a5 L& f- `{* ^2 [" O5 W0 t
[ -f $1 ] || exit 0/ D9 E" L9 n2 L' a L- Y% M
key="/^$cmd2:/{print \$3}" & l* q' S+ x O awk -F":" "$key" $1 9 n1 T/ E& y# G: r) U3 m7 u} # c' c# l" a0 i6 J0 e% f+ m# D, | L; K' b# G2 l- h+ L
#9 L% O2 u1 Z; Y( t6 ^& Q( p, |
# set datasize limit to hardlimit ) u F6 l H9 A$ N* H# 3 c* s" t6 t' @. J7 Sset_data_limit()% j; M6 b5 d; B1 B1 c3 c) R4 o7 U
{/ s5 I% i9 z7 a3 i0 G
dbglimit=0 - h& ?/ d5 m0 ?7 v' A+ U: H- \+ A hardlimit=`ulimit -Hd` " v9 Z2 c4 t$ t, A5 x softlimit=`ulimit -d`0 Q5 d' C1 q6 e" E
desiredlimit=3500000 2 f0 t. s% O. L hardisunlimited=0 & ~2 D7 v4 a5 h% C3 [ softisunlimited=0, `' H' s: K( I0 S
is64=00 B& f) B, Z/ U' r! R8 f2 B
0 F: B( R1 n, c( l/ [1 o7 @
case "$EPIC_ARCH" in _* `( f0 [- s& ?0 d7 C; |4 K *SUN*64) 5 Y9 r) Q' e+ k5 b G. v% y/ [ is64=1 ( _* A4 C/ a. n' |2 i ;; / H: E+ U6 m# B0 m; X( C4 ] amd64)5 X/ b0 \' F& g- p& S' l! v
is64=1 6 A6 U2 p# V! t' k2 V ;; & p' Q, y/ P0 P/ ?& T x86sol64) ) P) T$ Z- t% R+ A is64=1' e8 }" l2 ^4 E% n6 q4 \5 w
;;) l1 V/ r' ~& ]
aix64)# [* I0 d9 Y/ M1 F& M+ V4 e y: h
is64=1 - `6 b) r& f; ` ;; m/ X! h6 u) x X; \ suse64)8 l# L' E K% V9 M
is64=1 1 G/ ]+ p, o( g2 n- d5 v; \% K ;;4 j% O" s! x: c1 { w
esac& ` s' j+ y- P, |2 T q
" P' C5 I; D. S if [ $dbglimit -eq 1 ]; then9 T: v8 O. |! |7 Y4 D
echo hard $hardlimit soft $softlimit . b, A/ d5 | n- ^' C$ ` fi 2 B% y2 e6 Y+ O( M) y # g' M" g" v4 Q1 A if [ x$softlimit = "xunlimited" ]; then ; {9 t+ { ^6 Z& n: R! J6 u% V softisunlimited=1 $ |% O2 B1 c! @) j fi ! |1 g9 T% G: P1 U. z 6 ]0 ^. G& [, f% o* _ if [ x$hardlimit = "xunlimited" ]; then4 U# g& a# q4 H* i5 x$ }2 s* a' H
hardisunlimited=1 3 O1 }2 X4 _5 p) t2 f+ S/ \ fi H1 v2 v& f( J9 C
( a) ]4 L6 b' d% k # 64 bit machine should have bigger than 4G ! m5 P4 p$ W k if [ $is64 -eq 1 ]; then" v' k+ J( t4 D8 }
desiredlimit=5000000 7 D7 Y4 ]5 }9 s; J3 y q fi $ [6 Y* f& l# G9 {& H0 y' t- e7 i2 f5 ]1 e9 j3 C- h* I" c% D7 J
if [ $hardisunlimited -eq 0 ]; then M8 c) ~6 n: ], D: }0 ]
if [ $hardlimit -lt $desiredlimit ]; then0 S/ ]1 ]5 O4 J' X% N n f% H
echo "WARNING: datasize hard limit $hardlimit K is too small." 3 Z- R, I; ?, W. c% Z fi9 {! s) p, z U) u. X
fi $ x1 C3 D F$ z# J& D& G7 R2 }8 O/ c* X' S8 w
if [ $hardlimit != $softlimit ]; then r& J6 e& I. `! t$ {' [
ulimit -Sd $hardlimit % S. C5 Q$ e& ?# e+ R' E# echo "WARNING: datasize limit is set to `ulimit -Sd`"* f/ J- k, E3 C/ z
fi: O- f/ A1 Z' o% e' C! p3 }( U" p
+ G5 }' ~2 E. i3 Y8 F, L5 M if [ $dbglimit -eq 1 ]; then% w" A! \; y/ a! q; c. P3 m
echo datasize hard limit: `ulimit -Hd` M, c3 B3 e8 s# c5 f& R echo datasize soft limit: `ulimit -d` " |2 D; S% q9 P! w7 s$ ?& z fi" W" F, i- q: b. a
}3 Q: _! {( i) j! M; n* H
0 \6 ?1 t0 u& U9 v$ k
# " e( p/ u( H; T6 F# set stacksize limit to desired limit$ m c! S1 j* W4 c( p4 t5 O
# ' |* c5 t/ j0 [0 Y1 D0 A" a2 f# m( lset_stack_limit() * L/ n) @; n, e0 V{ ) k% B) t) S! I9 S; N4 Z4 h) ^ dbglimit=0) }% I7 Z" j# ~+ g( R5 A
hardlimit=`ulimit -Hs`4 h6 }0 @4 P' r. L: N+ L, |* d! p
softlimit=`ulimit -s`4 I" _7 m5 `8 ] u [, C
desiredlimit=60000 3 n! d5 \1 X0 g8 a4 d6 N hardisunlimited=0* x& W N9 S# B$ D T+ F
softisunlimited=0- H' f5 i! F0 q/ {$ a& d
is64=0% p% |$ T* \& {8 m4 ?1 L- [
1 J; P/ g+ c6 H0 K& z0 L! A6 s
case "$EPIC_ARCH" in p5 c2 [1 ~8 M. [ E5 x( e* Z
*SUN*64) % `2 B' f# y7 q- _- w is64=1- `4 m- @% R I& C& ?4 |
;; 3 U! ]8 ?* Q' o% Z7 A amd64); [/ V6 u6 g2 ~
is64=1" @8 {9 A5 E. `$ f( P8 |
;; / U: N5 x8 {8 M: R4 C7 q5 ^ x86sol64) , n' n: ]. T0 v ~; l# \- n is64=1" O" F" U/ a2 Z X! [. Q
;; ( s0 R1 _$ _) b, [: f8 ~. ? aix64): p# V# s9 M. t/ [
is64=1, e C, h) c4 I) J: O% E
;;/ q2 N$ U9 [/ a$ Q$ |( @2 b8 j
suse64)9 l f3 @9 I5 |8 j7 h" k0 \
is64=1* Q k1 u9 ^# ]7 d# E' \" S" d
;;" D; y" O& s+ I7 W# n3 `
esac - p) X1 r& L0 Z# f; `( M1 z1 `. {1 F2 W. \3 h& V
if [ "$EPIC_WRAPPER_DVLP" = "" ]; then4 V C6 |. ]* h0 w2 e# m, I1 W# J+ _6 d
if [ $is64 -eq 1 ]; then # `! W/ l- c6 ^ X desiredlimit=2000006 Z3 W2 ~3 o* ~' O- \& c* i7 H( V3 o# U
fi ; S0 G+ Z* h; U* [else5 } w# H$ _! u* y K
case "$EPIC_ARCH" in8 x8 F- H0 T5 O- q
*SUN*64) ( O0 z' X. B) V2 `) Z8 F; P desiredlimit=200000% K, R. _5 R: O4 |1 g/ E* s' K; G
;;) H$ e8 f1 y. X: e2 J+ F* P
esac( I& W& Y. l- N
fi 7 \% R& R8 k: ]8 f, Z! s1 l4 R. L 6 k9 h) n2 Z: Q9 S: a6 v/ Z
if [ $dbglimit -eq 1 ]; then z' v+ \3 z: Z" b3 b
echo hard $hardlimit soft $softlimit % W2 C! e2 I- a/ H# g- ~ fi6 X, Q+ ]* p) Q# E( c
' {: P+ J5 m m3 `' \) h' y. H R #stacksize can not be unlimited, pick smaller number 4 a/ T& d* q4 ~# h5 N/ g0 a! C L3 Z2 T: @" N4 k5 S- R: p9 k stacklimit=$desiredlimit) E4 B+ I, `- I$ [$ o- u
2 E9 `% _# R4 `( \( Y
if [ x$hardlimit = "xunlimited" ]; then: O- G6 I9 B+ o/ J
hardisunlimited=1 ) Z9 S! o6 v0 U' ~% B% |0 n fi( I2 D- D [1 n, J4 D
! L7 T. A, t% L1 Q if [ x$softlimit = "xunlimited" ]; then- | t( W$ {5 ]+ ]
softisunlimited=1 2 V! D: k: L0 Z" r5 X( w fi 8 X# f6 o7 u% t- |, q. f8 c1 G e& o" C( ?# z. q, a8 P3 X4 f w W if [ $hardisunlimited -eq 0 ]; then/ F0 v( s+ w( t* E, ]; y- V
if [ $hardlimit -lt $desiredlimit ]; then/ F. ^7 R" G' d$ |+ q. k+ s
echo "WARNING: stacksize hard limit $hardlimit K is too small." 9 ~: Y; I2 {) o4 @4 G4 F desiredlimit=$hardlimit 7 h' r$ ^3 B+ X, P5 g. | stacklimit=$desiredlimit * c! Q5 L/ a5 d8 y4 \' m fi- j3 E7 v( X- F6 G
fi 6 l9 U- n/ @& l $ x0 L6 z+ j w, m # desiredlimit is set to proper value (< hardlimit) 1 w% w( r# t2 }, v, j # H( `( v8 ~! c! a m# Q& R if [ $softisunlimited -eq 0 ]; then $ P' c9 X L6 e& l if [ $softlimit -gt $desiredlimit ]; then) P% j% `. Q! g7 y
stacklimit=$softlimit# d; P; c! l& c( E
fi & u8 T) i) c6 L6 r" R% O) Q4 R fi/ V' |, {6 v: x+ H' K5 l
1 R s8 s# l" L) `9 F: c% b% h2 L
if [ $softlimit != $stacklimit ]; then % l2 p8 T. J2 G5 g! X9 @2 f% v) H0 T ulimit -Ss $stacklimit 1 ^& b* A/ Q; Q; s( S: M( _# echo "WARNING: stacksize limit is set to `ulimit -Ss`"! Y' H/ e( B3 l6 z+ ^$ ?5 q
fi8 t+ A, i' g' M" ~# n8 `# `3 ]
9 |9 F* B% f { i# e9 B
if [ $dbglimit -eq 1 ]; then- l J9 i7 I: D( n- U
echo stacksize hard limit: `ulimit -Hs` t# ^1 b# y. D8 l2 j echo stackize soft limit: `ulimit -s`6 R* C9 Y5 L! r) i! t+ V- p6 A
fi% S, q( S( |- v7 |8 d6 c) q* j
}. u9 w1 T9 A4 J+ I/ d
- S+ `+ R4 [: B6 \
open_epicscriptmessages() ( {9 r7 N' x. M, N{8 w! S! { z: Y1 }! f
#generate temp ".epicscriptmessages" file based on pid 6 R4 N7 ~& a0 AEPIC_SCRIPT_MESSAGES_FILE="$EPIC_SCRIPT_MESSAGES_FILE"$$ 4 c% _/ R, \; i# \1 Qif [ -f $EPIC_SCRIPT_MESSAGES_FILE ] - V/ O& _# ^8 Q- Athen , q W3 m6 P C until [ ! -f $EPIC_SCRIPT_MESSAGES_FILE ]* ^" j7 E+ l" ~4 ^! L% _; s+ J
do5 T6 @; f6 u' q/ ]3 _
EPIC_SCRIPT_MESSAGES_FILE="$EPIC_SCRIPT_MESSAGES_FILE"$$ $ P% L! G8 F( l) p done! O3 y5 @0 s7 `& h
fi % M# R+ K. V" R* E F* }0 t 1 Y; `( W1 ]' L% i6 l' kexport EPIC_SCRIPT_MESSAGES_FILE / X0 |/ x+ n4 i1 E' @}+ V g& R& G/ M+ k7 e+ X% G
& \+ T1 e/ e7 X
2 Q# Q4 N. [+ W, E9 y. pcmdname=`basename $0`8 n7 k3 M/ F* ]$ S. {
postgres="n" 9 Z' d! n( K! J6 Y1 O: @ostore="n"3 s2 x7 y5 u ]6 j: Q4 M
gui="n"8 C$ L1 {; o% {, A
databaseOn="n"6 x% e7 B( O1 p( ?) I) U2 i
f_next=0/ h/ U' [ m2 m, K- y
f_option="" 8 x" Z$ f2 I) eo_next=0* D9 Q# v }0 S i' x/ i; f8 N. ^
o_option="" }8 Y P7 _8 g% O5 B8 L7 N
workDir="", T* V& D2 |2 R; l3 d+ X
workDir_next=02 G3 \/ c$ s+ W) e9 S
errFile="powrmill.err"+ ^$ Q- n; [, t- A0 h) a9 g+ T. L
win32flags=""9 n& y/ @ n' D X8 g! E% H
ln_default="ln -s" $ I2 s5 Q' s/ C( C2 w, _9 E4 Z: z" D7 L/ }1 k. ?
har_hilo_file=""# c% C# ~7 f; ]% W
have_har_flag=09 |; I, ~& L8 B
have_har_setup_flag=06 E3 r; s3 W) f! P2 f4 H( w
is_special_har_run=0* O. l2 z. C( V
har_ofile_prefix="" : c7 d& q7 j! S" x& O0 W$ K2 J2 E* { Q& a% A% s3 }
have_va_flag=0# U6 D! A/ }+ I) W/ C
have_vaf_flag=0* E% B7 X3 V, f, w
VAF_FILE=""( b) x" l2 V* ~3 s8 Q1 X- v
VA_FILE=""! {. c' J6 v5 y1 j9 q
ARGV="" 1 C/ j4 @- x! l7 c1 y, U% P& n8 p* J) H" d! P( ^0 M' A% L
ORIGINAL_COMMAND_LINE= ; }/ _" g( A$ d7 d# A W8 @LOOP_CTRL_FILE=".ns_ba_env"1 l5 {; q- x# R3 i" E5 ~# m
ALTER_HK_FILE=".alter_hkf"9 X1 r2 _% j0 Q( t2 M: c4 n
ALTER_COUNT_FILE=".alter_count"2 h' R3 w% t! ?) U* y
MONTE_IMG_FILE=".monte_img_f" 8 Q# L9 b- I) @/ TMONTE_COUNT_FILE=".monte_count" 6 ^1 v, O. z0 h- U# }: ~6 b* U3 |MONTE_CFG_FILE=".monte_cfg" F1 g+ T a& c, F- B: yEPIC_SCRIPT_MESSAGES_FILE=".epicscriptmessages"* A' [. _, K6 L! C3 D% Q G
: V2 V- c3 f8 u& C9 hopen_epicscriptmessages $@0 R4 R5 e2 t. Y7 j) K, p
+ C# U7 i" C b5 E( G ~scan_for_hva_args $@7 ]+ E5 O& n5 J+ V4 F
% o/ f: V$ Z3 z) I
scan_for_har_args() ) q; U1 _2 h; B4 ?2 c+ j{" p# m) i* T. A$ H' _
while [ $# -gt 0 ]; do $ D; u2 c* U$ e# A* F case "$1" in 3 W! T2 h! E# }' t0 l -har). v5 x2 P9 M" `0 z# d, Q7 f
have_har_flag=17 C: e0 ~1 ^2 j$ q
[ $# -gt 0 ] && shift 0 V% d9 Z |; k( k+ u L! h if [ $# -gt 0 -a `expr "$1" : '-.*'` -eq 0 ]; then & B7 c8 C- l. n: M* V% Z har_hilo_file=$1 + e* p4 B, @8 h$ n/ O. D0 x shift# W9 }4 m5 F p' m5 b
fi ( W' r! X$ Q0 U* w if [ $# -gt 0 -a `expr "$1" : '-.*'` -eq 0 ]; then 7 [8 j" l, u9 |& _" f6 E: X echo "Too many arguments to -har flag. Only one hilo file allowed."9 Y, G+ T+ s, y* K9 n" G J
exit 1 - m1 K6 C$ g" n: E fi 0 J1 F+ G6 B# i, G4 E break P3 S* G3 T1 d# c6 K ;; : F8 h! i: F) r' `9 ?7 d -har_setup); G3 ^- o. c- ^& D/ X Q8 Z" a
have_har_setup_flag=1 * H3 t1 S: j& A. i. h; n" i break . H3 B. C) n) B5 a( A& T1 S ;; 4 Z- d# J. R9 B! }. N6 E *) * x# o* r6 c( p/ ~# n3 n0 ^+ n* z shift 0 H) W* G0 n) h( O ;; + n, S8 G C7 Q- a3 F esac; L- p- ]( |, s
done 0 w9 d( H+ ?. i, V, u2 t} + c% p8 P- I" _% M+ ]8 H$ }3 f: C" @; n7 s* n: j
scan_for_har_args $@ / d6 {6 f# I2 ~5 _( W( E# {6 I7 ?6 ~1 b$ J& f) R" q
for argv in $@ 3 s& N/ q- j, x1 H- f; y& n; kdo. E, Z: ]2 Q1 {- I6 s
ORIGINAL_COMMAND_LINE="$ORIGINAL_COMMAND_LINE $argv" 2 {8 w4 ~, u6 N! w( j& f4 d3 U if [ $argv = "-gadb" ]; then : S# F$ ?: C9 p$ k9 { databaseOn="y"" J9 A8 Z/ z& A& z# f
workDir_next=1 ; s7 D' x/ P! q5 W4 F elif [ $workDir_next -eq 1 ]; then- H$ L6 ^1 x! k8 S
workDir=$argv 6 c& b1 P1 h3 O: r workDir_next=0$ Y: x) `$ `2 Y' `" B. C
elif [ $argv = "-ga" ]; then( [/ i: ~. d- x( S
gui="y" 1 @) ]0 a' c! C8 z+ M) f elif [ $argv = "-f" ]; then: _1 p; ^+ u2 b6 t% J
f_next=1" H$ d/ ? D2 d" u
elif [ $f_next -eq 1 ]; then5 E% ~: G% M/ j8 J0 a, p9 D
f_option=$argv . `( L% L5 X/ S' u( k f_next=03 O8 Z9 v5 [. Y) L6 N
elif [ $argv = "-o" ]; then; L/ r [1 C% v' ~8 c) ^# c
o_next=1 4 G# a2 ]" |0 C' b2 K/ \ elif [ $o_next -eq 1 ]; then ( w5 a" [0 B# Z3 M$ l o_option=$argv & k2 a6 H0 D7 _# b o_next=06 @3 } x2 j8 Z/ H0 F% J! ~
fi : x1 {( w5 b) R6 X* q5 M; hdone $ k6 O" ]/ @9 F1 o) e% necho "Command line options: $ORIGINAL_COMMAND_LINE" > $EPIC_SCRIPT_MESSAGES_FILE ' ^" z- P5 C8 F, {: @; i9 D9 X& E$ e ( d3 |0 p8 R( xif [ $databaseOn = "y" -o $gui = "y" ]; then0 z1 Y8 M6 M* W5 V; z1 {! W
if [ $cmdname = "pathmill" ]; then4 d1 l& u; Q7 _
if [ "$EPIC_ARCH" = "SUN4_SUNOS_5" -o "$EPIC_ARCH" = "SUN4_SUNOS_5_64" ]; then . G+ n; F( A% I. F( A: ] ostore="y"# Z) Y& K/ v; ]
postgres="n"4 W G% W. L! K
else1 N5 e6 D! R# k S2 {
echo "athmill GUI is supported on Solaris platforms only" 1>&2 * o% L+ G; j/ W7 N0 r
exit7 g3 d* r. Z: ?0 N5 p
fi : U5 ?3 A; e' k, Z4 q" } else + U/ s7 a( B Q( V postgres="y" + \+ e. l% R) E# s& N% D- w7 ^9 A ostore="n" , B8 [0 s6 L- O fi q6 r8 L$ o9 y7 ifi ( z2 j5 D6 s% n: R. J / \0 y/ \/ r% k; O; h5 K! pif [ $gui = "y" ]; then* ]9 S& v8 {/ o& n
if [ $cmdname = "powrmill" ]; then9 s3 Z2 S7 K3 N, J! |2 {. C; L
pwga $@ , @) K3 s: y' D$ H& T exit! ?) s. A, [. F& F
fi( `1 U; p( L! @1 Q2 h
% d& c2 O; M4 X: i4 J1 E( J
if [ $cmdname = "pathmill" ]; then ]8 Y" E) ^1 P$ a9 ^: g if [ $ostore = "y" ]; then; X" V- y. M9 d
./pathfinder $@ $ H2 Q& Y/ o& x' P/ [ exit( E& I1 t& N6 G
elif [ $postgres = "y" ]; then4 p7 I# ?8 }: v8 k# t2 F" i
pmga $@6 J6 k' G$ C4 t+ M4 u
exit ( o3 H7 Q/ w9 q5 } fi( X; E- d7 P0 e" O O$ T
fi8 r, ?" i. ^5 Z2 n1 c
fi 1 p# ]) p. K L/ Q& b! E* @* t" x% s + o6 Q1 |2 n% f3 Y/ Jif [ $databaseOn = "y" ]; then 1 X8 R, K2 M" F$ T if [ $ostore = "y" ]; then 1 d0 v8 L7 R" W. r5 ]) S% q" Y) z if [ -z "$workDir" ]; then. r2 Y6 K) x$ U o
echo "Error: Missing argument for -gadb option"9 s- Y+ }4 d7 A$ ]
Exit 1: Y% l# |! [) `
fi + |+ E3 |& R; E- B6 a' H: U fi( k# m7 v$ z! L0 Z5 h8 m
if [ $postgres = "y" ]; then0 [! B4 O6 \/ {# p4 G
if [ -z "$workDir" ]; then+ b: M, a3 R& T' W* Q& Y+ I
echo "Error: Missing argument for -gadb option"8 U/ ~% ?! j2 r0 Q9 t/ Q
Exit 1! u/ V$ R) I1 O3 d6 _' @! ~+ c
fi 9 A& H( }7 L) u. o fi , K9 y9 V1 }* \ I/ f- Gfi* L3 n0 Y) @9 n: {# T8 K: s
6 q2 l. v( K4 d4 w9 Tif [ $postgres = "y" ]; then * A8 T. m: J& ? F# f2 D7 _% [5 @, F4 _* |
if [ -r $EPIC_BIN/scripts/gui-init ]; then1 y4 F$ A7 A S& a. K) g
. $EPIC_BIN/scripts/gui-init! G |9 f0 r4 L$ k- k2 ?3 B
elif [ -r $SES_ROOT/bin/scripts/gui-init ]; then/ F' b4 Q5 F; t4 L' W7 i
. $SES_ROOT/bin/scripts/gui-init 9 D5 g3 \+ n; M- s& K else1 S9 [% u" \$ S- E. X; u* h' `
echo " ** Installation in \"$EPIC_HOME\" has been corrupted!" 1>&24 V) ]$ n& N: z
echo " file bin/scripts/gui-init is missing." 1>&29 e- O1 `8 k: G. i( @
fi0 n* ~+ d% |( n3 c