Add packaging scripts for creating hip_samples package
Change-Id: I38205ce851ee2d8affce532c80c9a9fd4f66b345
[ROCm/hip commit: 9a25f6ad8f]
Αυτή η υποβολή περιλαμβάνεται σε:
Εκτελέσιμο αρχείο
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
function die {
|
||||
echo "${1-Died}." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
payload=$1
|
||||
script=$2
|
||||
[ "$payload" != "" ] || [ "$script" != "" ] || die "Invalid arguments!"
|
||||
tmp=__extract__$RANDOM
|
||||
|
||||
printf "#!/bin/bash
|
||||
samples_dir=\$1
|
||||
[ \"\$samples_dir\" != \"\" ] || read -e -p \"Enter the path to extract the HIP samples: \" samples_dir
|
||||
mkdir -p \$samples_dir
|
||||
PAYLOAD=\`awk '/^__PAYLOAD_BELOW__/ {print NR + 1; exit 0; }' \$0\`
|
||||
tail -n+\$PAYLOAD \$0 | tar -xz -C \$samples_dir
|
||||
echo \"HIP samples installed in \$samples_dir\"
|
||||
exit 0
|
||||
__PAYLOAD_BELOW__\n" > "$tmp"
|
||||
|
||||
cat "$tmp" "$payload" > "$script" && rm "$tmp"
|
||||
chmod +x "$script"
|
||||
Αναφορά σε νέο ζήτημα
Block a user