Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
d87e70ee
Commit
d87e70ee
authored
Jul 15, 2004
by
Mike Hibler
Browse files
Make it work on linux too.
More error checking.
parent
5581f5e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/trafgen/tg-install
View file @
d87e70ee
#!/bin/sh
# cd from <builddir>/event/trafgen to testbed/event/trafgen
if
[
-x
/usr/bin/fetch
]
;
then
fetch
=
/usr/bin/fetch
elif
[
-x
/usr/bin/wget
]
;
then
fetch
=
/usr/bin/wget
else
echo
"ERROR: tg-install: need either 'fetch' or 'wget' installed"
exit
1
fi
if
[
!
-d
$1
/tg2.0/src
]
;
then
echo
"Downloading tg2.0 source from www.emulab.net to
$1
..."
cd
$1
fetch http://www.emulab.net/tg2.0.tar.gz
$
fetch
http://www.emulab.net/tg2.0.tar.gz
if
[
$?
-ne
0
]
;
then
echo
"Failed..."
echo
"Downloading tg2.0 source from www.postel.org to
$1
..."
fetch http://www.postel.org/tg/tg2.0.tar.gz
$fetch
http://www.postel.org/tg/tg2.0.tar.gz
||
{
echo
"ERROR: tg-install:
$fetch
failed"
exit
1
}
fi
echo
"Unpacking/patching tg2.0 source ..."
tar
xzf tg2.0.tar.gz
patch
-p0
< tg.patch
tar
xzf tg2.0.tar.gz
||
{
echo
"ERROR: tg-install: tar failed"
exit
1
}
patch
-p0
< tg.patch
||
{
echo
"ERROR: tg-install: patch failed"
exit
1
}
rm
-f
tg2.0.tar.gz tg2.0/
*
/
*
/
*
.orig
fi
exit
0
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment