clojure-lsp: update to 2024.08.05.
[void-pkg.git] / common / xbps-src / libexec / xbps-src-dopatch.sh
blobc1b3b0468d42708da60a136cc7fbd17de893f883
1 #!/bin/bash
3 # vim: set ts=4 sw=4 et:
5 # Passed arguments:
6 # $1 - pkgname [REQUIRED]
7 # $2 - cross target [OPTIONAL]
9 if [ $# -lt 1 -o $# -gt 2 ]; then
10 echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
11 exit 1
14 PKGNAME="$1"
15 XBPS_CROSS_BUILD="$2"
17 for f in $XBPS_SHUTILSDIR/*.sh; do
18 . $f
19 done
21 setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
23 XBPS_PATCH_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_patch_done"
25 if [ -f $XBPS_PATCH_DONE ]; then
26 exit 0
29 for f in $XBPS_COMMONDIR/environment/patch/*.sh; do
30 source_file "$f"
31 done
33 run_step patch optional
35 touch -f $XBPS_PATCH_DONE
37 exit 0