mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-22 23:31:26 +00:00
Add support to have custom directory name for cloned repo
This commit is contained in:
parent
e9e8ae3629
commit
66772837c0
@ -147,14 +147,18 @@ R2PM_ListUninstalled() {
|
||||
|
||||
R2PM_GIT() {
|
||||
URL="$1"
|
||||
if [ -z "$2" ]; then
|
||||
DIR="`basename $1`"
|
||||
else
|
||||
DIR="$2"
|
||||
fi
|
||||
cd "${R2PM_GITDIR}"
|
||||
if [ ${IS_LOCAL} = 0 ]; then
|
||||
if [ -d "${R2PM_GITDIR}/${DIR}" ]; then
|
||||
cd "${DIR}"
|
||||
git pull
|
||||
else
|
||||
git clone "${URL}" || R2PM_FAIL "Oops"
|
||||
git clone "${URL}" "${DIR}" || R2PM_FAIL "Oops"
|
||||
cd "${DIR}" || R2PM_FAIL "Oops"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user