From 473247ef13cb39e1d24ac5e022fd1bfb9b52b701 Mon Sep 17 00:00:00 2001 From: Kevin Phoenix Date: Tue, 10 Jan 2023 15:59:46 -0700 Subject: [PATCH] Fix remote detection not working if git is not already installed --- setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index af671fb4a..867bb0946 100755 --- a/setup.sh +++ b/setup.sh @@ -63,7 +63,11 @@ declare -A EXTRA_DEPS EXTRA_DEPS["angr"]="sqlalchemy unicorn==2.0.1.post1" EXTRA_DEPS["pyvex"]="--pre capstone" -ORIGIN_REMOTE=${ORIGIN_REMOTE-$(git remote -v | grep origin | head -n1 | awk '{print $2}' | sed -e "s|[^/:]*/angr-dev.*||")} +if [ ! $(which git) ]; then + ORIGIN_REMOTE=${ORIGIN_REMOTE-$(git remote -v | grep origin | head -n1 | awk '{print $2}' | sed -e "s|[^/:]*/angr-dev.*||")} +else + ORIGIN_REMOTE="https://github.com/" +fi REMOTES=${REMOTES-${ORIGIN_REMOTE}angr ${ORIGIN_REMOTE}shellphish ${ORIGIN_REMOTE}mechaphish https://git:@github.com/zardus https://git:@github.com/rhelmot https://git:@github.com/salls https://git:@github.com/lukas-dresel https://git:@github.com/mborgerson}