You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
495 B
22 lines
495 B
9 years ago
|
vcs_git() {
|
||
|
if [ ! -d "$dir_source/$name/vcs" ]; then
|
||
|
rm -rf "$dir_source/$name/vcs"
|
||
|
git clone --recursive --depth=1 "$1" "$dir_source/$name/vcs"
|
||
|
vcs_compile=true
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
_hook_git() {
|
||
|
cd "$dir_source/$name/vcs"
|
||
|
|
||
|
git remote update
|
||
|
if [ "$(git rev-parse @)" != "$(git rev-parse @{u})" ]; then
|
||
|
git pull
|
||
|
vcs_compile=true
|
||
|
fi
|
||
|
version="$(git rev-list HEAD --count)-$(git rev-parse --short HEAD)"
|
||
|
cd "$OLDPWD"
|
||
|
}
|
||
|
|
||
|
_hooks="_hook_git"
|