diff --git a/graveyard/unmaintained_satellites/armips-git.sat b/satellites/armips-git.sat similarity index 78% rename from graveyard/unmaintained_satellites/armips-git.sat rename to satellites/armips-git.sat index ff33bd8..e4dc095 100644 --- a/graveyard/unmaintained_satellites/armips-git.sat +++ b/satellites/armips-git.sat @@ -4,6 +4,7 @@ import 'compile/cmake' name=armips vcs_git "https://github.com/Kingcom/$name" +vcs_git -V 'https://github.com/Kingcom/tinyformat' "$name/ext/tinyformat" header_end cd "$name" diff --git a/satellites/functions/vcs/git.sh b/satellites/functions/vcs/git.sh index 7faba2b..b99a0c6 100644 --- a/satellites/functions/vcs/git.sh +++ b/satellites/functions/vcs/git.sh @@ -1,12 +1,14 @@ vcs_git() { local rev='master' local setver=true + local clone=true local OPTIND=1 local opt - while getopts 'r:V' opt; do case "$opt" in + while getopts 'r:VC' opt; do case "$opt" in r) local rev="$OPTARG" ;; V) local setver=false ;; + C) local clone=false ;; esac; done shift $((OPTIND-1)) [ "$1" = '--' ] && shift @@ -28,7 +30,7 @@ vcs_git() { fi # Make sure we have the latest of whatever revision we want - git fetch --prune --depth=1 --recurse-submodules origin "$rev" || true + git fetch --prune --depth=1 origin "$rev" || true # Check if it's actually been updated local rev="$(git rev-parse "$rev")" @@ -37,19 +39,39 @@ vcs_git() { vcs_compile=true fi + # Update the $version variable accordingly + [ "$setver" = true ] && version="$(git rev-list HEAD --count)_$(git rev-parse --short HEAD)" || true + cd "$OLDPWD" # Clone the repository - if [ "$download_only" = false ]; then - git clone "$dir" "$reponame" 2> /dev/null + if [ "$download_only" = false -a "$clone" = true ]; then + vcs_git_clone -r "$rev" "$1" "$2" + fi +} + +vcs_git_clone() { + local rev='master' + local setver=true + + local OPTIND=1 + local opt + while getopts 'r:' opt; do case "$opt" in + r) local rev="$OPTARG" ;; + esac; done + shift $((OPTIND-1)) + [ "$1" = '--' ] && shift - cd "$reponame" + local reponame="$(basename "$1")" + local dir="$dir_source/$name/$reponame" + [ "$2" ] && local dest="$2" || local dest="$reponame" + mkdir -p "$dest" - git checkout "$rev" 2> /dev/null + git clone "$dir" "$dest" 2> /dev/null - # Update the $version variable accordingly - [ "$setver" = true ] && version="$(git rev-list HEAD --count)_$(git rev-parse --short HEAD)" || true + cd "$dest" - cd "$OLDPWD" - fi + git checkout "$rev" 2> /dev/null + + cd "$OLDPWD" } diff --git a/satellites/i3status.sat b/satellites/i3status.sat index 9eaefdb..e8f5fc1 100644 --- a/satellites/i3status.sat +++ b/satellites/i3status.sat @@ -2,7 +2,7 @@ name=i3status version=2.11 update_url="https://i3wm.org/$name/" -define_option 'pulseaudio: Add pulseaudio support' +define_option 'pulseaudio: Build with support for PulseAudio' dlextract "https://i3wm.org/$name/$name-$version.tar.bz2" \ 'a5c0a364d917ffc57c42af3f6936e700' diff --git a/satellites/radare2.sat b/satellites/radare2.sat index 3aabeab..e16370a 100644 --- a/satellites/radare2.sat +++ b/satellites/radare2.sat @@ -1,5 +1,6 @@ # Build with the included version of capstone due to it using a newer version and includes patches for it. # It also contains a patched libmagic which is incompatible with most systems. +# TODO: Now we're using a stable radare2 instead of git, use system capstone (as there's little patches left to be upstreamed) and possibly libmagic. import 'compile/configure' diff --git a/graveyard/unmaintained_satellites/vbindiff.sat b/satellites/vbindiff.sat similarity index 100% rename from graveyard/unmaintained_satellites/vbindiff.sat rename to satellites/vbindiff.sat