diff --git a/script/create-single-header.sh b/script/create-single-header.sh index 152e6cb15b0..fd88526951f 100755 --- a/script/create-single-header.sh +++ b/script/create-single-header.sh @@ -3,7 +3,15 @@ workingcopy_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )/.." dst=${1:-$workingcopy_dir/single-header/include/alpaka/alpaka.hpp} tmp_dir=$(mktemp -d) -git clone https://github.com/shrpnsld/amalgamate.git --depth 1 $tmp_dir/clone +# clone amalgamate into $tmp_dir/clone and checkout to a specific commit +current_dir=$(pwd) # Save the current directory +commit_hash="a4796f0515fbc56d375a5013dd9004605df9c761" +git clone https://github.com/shrpnsld/amalgamate.git --depth 1 "$tmp_dir/clone" && +cd "$tmp_dir/clone" && +git fetch --depth 1 origin "$commit_hash" && +git checkout "$commit_hash" +cd "$current_dir" +#run amalgamate command to create header file $tmp_dir/clone/amalgamate -o $tmp_dir -v -a -n 'alpaka' -I $workingcopy_dir/include -- $workingcopy_dir/include/alpaka/alpaka.hpp mv $tmp_dir/alpaka-amalgamated/alpaka.hpp $dst rm -rf $tmp_dir