Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[r126]: stripbin.sh Maximize Restore History

Download this file

stripbin.sh    29 lines (21 with data), 613 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#Usage: stripbin.sh <mspgcc prefix>
set -eu
if [ "$#" != 1 ]; then
echo >&2 "Usage: $0 <mspgcc prefix>";
exit 1
fi
DEST="$1" ; shift
case "$DEST" in
/*) ;;
*) echo >&2 "mspgcc prefix must be absolute, got \"$DEST\". Abort."
exit 1
;;
esac
INSTALL_LAUNCHER=$(sh do-detect-sudo.sh "$DEST")
set +e # there are some non-binary files in those directories (scripts),
# we don't want to abort => set +e
cd "$DEST/bin" && $INSTALL_LAUNCHER strip *
cd "$DEST/msp430/bin" && $INSTALL_LAUNCHER strip *
cd "$DEST/libexec/gcc/msp430"/* && $INSTALL_LAUNCHER strip * install-tools/*
true # pretend success