2015-04-29 21:55:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-09-21 21:40:17 +00:00
|
|
|
while : ; do
|
|
|
|
if [ -f sys/rebuild.sh ]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
cd ..
|
|
|
|
if [ "`pwd`" = / ]; then
|
|
|
|
echo "Cant find sys/rebuild.sh"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2015-04-29 21:55:03 +00:00
|
|
|
Rebuild() {
|
2015-09-21 21:40:17 +00:00
|
|
|
cd "$1" || exit 1
|
2015-04-29 21:55:03 +00:00
|
|
|
make clean
|
|
|
|
make -j8 || exit 1
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
|
2015-10-30 23:51:44 +00:00
|
|
|
Build() {
|
|
|
|
cd "$1" || exit 1
|
|
|
|
make -j8 || exit 1
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
|
2015-09-21 21:40:17 +00:00
|
|
|
RebuildIOSDebug() {
|
2015-10-31 02:45:14 +00:00
|
|
|
Rebuild libr/debug
|
2015-11-16 23:57:22 +00:00
|
|
|
# Rebuild libr/util
|
|
|
|
# Rebuild libr/core
|
2015-09-21 21:40:17 +00:00
|
|
|
Rebuild binr/radare2
|
|
|
|
make -C binr/radare2 ios-sign
|
|
|
|
if [ -n "${IOSIP}" ]; then
|
|
|
|
scp binr/radare2/radare2 root@"${IOSIP}:."
|
|
|
|
else
|
|
|
|
echo "Set IOSIP environment variable to scp the radare2 program"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-04-29 21:55:03 +00:00
|
|
|
RebuildJava() {
|
|
|
|
Rebuild shlr/java
|
|
|
|
Rebuild libr/asm
|
|
|
|
Rebuild libr/bin
|
2015-05-11 16:30:06 +00:00
|
|
|
Rebuild libr/core
|
2015-04-29 21:55:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RebuildCapstone() {
|
|
|
|
Rebuild shlr/capstone
|
|
|
|
Rebuild libr/asm
|
|
|
|
Rebuild libr/anal
|
|
|
|
}
|
|
|
|
|
|
|
|
RebuildSdb() {
|
|
|
|
Rebuild shlr/sdb
|
|
|
|
Rebuild libr/db
|
|
|
|
}
|
|
|
|
|
|
|
|
RebuildBin() {
|
|
|
|
Rebuild libr/bin
|
|
|
|
Rebuild libr/core
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
bin) RebuildBin ; ;;
|
|
|
|
sdb) RebuildSdb ; ;;
|
|
|
|
bin) RebuildBin ; ;;
|
|
|
|
java) RebuildJava ; ;;
|
2015-09-21 21:40:17 +00:00
|
|
|
iosdbg) RebuildIOSDebug ; ;;
|
2015-04-29 21:55:03 +00:00
|
|
|
capstone|cs) RebuildCapstone ; ;;
|
|
|
|
*)
|
2015-10-31 02:45:14 +00:00
|
|
|
echo "Usage: sys/rebuild.sh [java|capstone|sdb|iosdbg|cs|sdb|bin]"
|
2015-04-29 21:55:03 +00:00
|
|
|
;;
|
|
|
|
esac
|