u
This commit is contained in:
7
script_nuance/platform.sh
Normal file
7
script_nuance/platform.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
PLATFORM=`hostname | perl -ne 'if (/AC-/) {exec "echo aachen_linux"} elsif (/ac-llu/) {exec "echo aachen_windows"} elsif (/ac-nb-llu/) {exec "echo aachen_windows"} elsif (/xena|cvshost|bn-|wa-|grid-/) {exec "echo burlington_linux"} elsif (/neptune/) {exec "echo home_windows"} else {exec "echo unknown"}'`
|
||||
# it must return some non-empty string for unknown hostnames,
|
||||
# otherwise it makes if statement be wrong for unknown hostnames:
|
||||
# if [ $PLATFORM == 'somename' ]
|
||||
# when $PLATFORM is empty string, there would be nothing to the left of ==.
|
||||
Reference in New Issue
Block a user