[build] add SKIP_BUILD_HOOK support for curl (#15923)
#### Why I did it To support SKIP_BUILD_HOOK for curl command so the targets downloaded by curl (SONIC_ONLINE_DEBS, SONIC_ONLINE_FILES) can utilize it. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it Add a logic to invoke a real command instead of a `download_packages()` (the same way it's done for wget) #### How to verify it Add an online target (with URL attribute). Add the "SKIP_VERSION=y" to this target. Check that download_packages is not invoked.
This commit is contained in:
parent
44d52dbb8b
commit
d0a40afcad
@ -3,4 +3,9 @@
|
||||
. /usr/local/share/buildinfo/scripts/buildinfo_base.sh
|
||||
[ -z $REAL_COMMAND ] && REAL_COMMAND=/usr/bin/curl
|
||||
|
||||
if [ "$SKIP_BUILD_HOOK" == y ]; then
|
||||
$REAL_COMMAND "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
REAL_COMMAND=$REAL_COMMAND download_packages "$@"
|
||||
|
Reference in New Issue
Block a user