mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Support arguments to install_git.
This commit is contained in:
11
install.sh
11
install.sh
@@ -55,15 +55,16 @@ function install_git {
|
|||||||
if ! which git > /dev/null ; then
|
if ! which git > /dev/null ; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local REPO="${1}"
|
local REPO="${*: -2:1}"
|
||||||
local DESTDIR="${2}"
|
local DESTDIR="${*: -1:1}"
|
||||||
|
set ${*:1:-2}
|
||||||
if [[ -d ${DESTDIR}/.git ]] ; then
|
if [[ -d ${DESTDIR}/.git ]] ; then
|
||||||
( cd ${DESTDIR} ; git pull -q )
|
( cd ${DESTDIR} ; git pull -q )
|
||||||
else
|
else
|
||||||
if [[ ${MINIMAL} -eq 1 ]] ; then
|
if [[ ${MINIMAL} -eq 1 ]] ; then
|
||||||
git clone --depth 1 ${REPO} ${DESTDIR}
|
git clone --depth 1 $* ${REPO} ${DESTDIR}
|
||||||
else
|
else
|
||||||
git clone ${REPO} ${DESTDIR}
|
git clone $* ${REPO} ${DESTDIR}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -82,7 +83,7 @@ function install_pwndbg {
|
|||||||
if ! which gdb > /dev/null 2>&1 ; then
|
if ! which gdb > /dev/null 2>&1 ; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
install_git https://github.com/pwndbg/pwndbg.git $HOME/.pwndbg
|
install_git -b stable https://github.com/pwndbg/pwndbg.git $HOME/.pwndbg
|
||||||
mkdir -p $HOME/.pwndbg/vendor
|
mkdir -p $HOME/.pwndbg/vendor
|
||||||
local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
|
local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
|
||||||
local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
||||||
|
|||||||
Reference in New Issue
Block a user