Skip to content

Commit 68fdbc3

Browse files
plavinPatrick Robert Lavin
authored andcommitted
pin download script
1 parent 6c2dd69 commit 68fdbc3

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

scripts/download-pin.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
3+
if [ $# -lt 1 ];
4+
then
5+
echo "No version given. Defaulting to 3.28"
6+
ver=3.28
7+
else
8+
ver=$1
9+
fi
10+
11+
TARGET=pin-$ver
12+
13+
if [ -e "$TARGET" ];
14+
then
15+
echo "File $TARGET already exists"
16+
exit 1
17+
fi
18+
19+
if [ "$ver" == "3.28" ];
20+
then
21+
FILE=pin-3.28-98749-g6643ecee5-gcc-linux
22+
elif [ "$ver" == "3.29" ];
23+
then
24+
FILE=pin-3.29-98790-g1a445fcd1-gcc-linux
25+
elif [ "$ver" == "3.30" ];
26+
then
27+
FILE=pin-3.30-98830-g1d7b601b3-gcc-linux
28+
elif [ "$ver" == "3.31" ];
29+
then
30+
FILE=pin-external-3.31-98869-gfa6f126a8-gcc-linux
31+
else
32+
echo "Unsupported Pin version"
33+
exit 1
34+
fi
35+
36+
FILENAME=$FILE.tar.gz
37+
URL=https://software.intel.com/sites/landingpage/pintool/downloads/$FILENAME
38+
39+
wget $URL
40+
tar xvzf $FILENAME
41+
42+
mv $FILE $TARGET
43+
rm $FILENAME
44+
45+
echo "Downloaded Pin v$ver in $TARGET"

0 commit comments

Comments
 (0)