[CI] Use the kernel2 hab when building kernel2 packages
set -eou pipefail
+source .expeditor/scripts/shared.sh
+
package_path=${1?package_path argument required}
+declare -g hab_binary
+curlbash_hab
+
# Since we are only verifying we don't have build failures, make everything
# temp!
export HAB_ORIGIN
@@ -15,6 +20,6 @@ export HAB_CACHE_KEY_PATH
HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys"
echo "--- :key: Generating fake origin key"
-hab origin key generate
+${hab_binary} origin key generate
echo "--- :hab: Running hab pkg build for $package_path"
-hab pkg build -D "$package_path"
+${hab_binary} pkg build -D "$package_path"
