forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
user-install
and user-uninstall
make targets
- Add sys/user.sh to install r2 at home
- Loading branch information
Showing
3 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
|
||
MAKE=make | ||
gmake --help >/dev/null 2>&1 | ||
[ $? = 0 ] && MAKE=gmake | ||
|
||
# find root | ||
cd `dirname $PWD/$0` ; cd .. | ||
|
||
# update | ||
if [ "$1" != "--without-pull" ]; then | ||
if [ -d .git ]; then | ||
git branch | grep "^\* master" > /dev/null | ||
if [ $? = 0 ]; then | ||
echo "WARNING: Updating from remote repository" | ||
git pull | ||
fi | ||
fi | ||
else | ||
shift | ||
fi | ||
|
||
if [ -z "${HOME}" ]; then | ||
echo "HOME not set" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "${HOME}" ]; then | ||
echo "HOME is not a directory" | ||
exit 1 | ||
fi | ||
|
||
ROOT=${HOME}/.radare2-prefix | ||
|
||
if [ "${HARDEN}" = 1 ]; then | ||
./sys/build-harden.sh ${ROOT} && ${MAKE} symstall | ||
else | ||
./sys/build.sh ${ROOT} && ${MAKE} symstall | ||
fi | ||
${MAKE} user-install | ||
echo | ||
echo radare2 is now installed in ~/.radare2-prefix | ||
echo | ||
echo Now add ${HOME}/bin to your ${PATH} | ||
echo |