Commit fb4d7354 authored by Hiro's avatar Hiro 🏄
Browse files

Test running tasks in create-traballs.sh script in parallel, 4 at a time

parent f5eb3a1d
Pipeline #32962 passed with stage
in 2 minutes and 27 seconds
Subproject commit 6e9a32a89e8f48c70988d9f5cb0eb27a14b3ebe8
Subproject commit c5d7511a7300dd535d368ccb3390b52bff453534
......@@ -111,18 +111,22 @@ DIRECTORIES=($(printf "%s\n" "${DIRECTORIES[@]}" | uniq))
for (( i = 0 ; i < ${#TARBALLS[@]} ; i++ )); do
if [ ! -d ${TARBALLS[$i]} ]; then
echo `date` "Creating symlink for" ${TARBALLS[$i]}
echo `date` "Creating symlink for" ${TARBALLS[$i]}
ln -s ${DIRECTORIES[$i]} ${TARBALLS[$i]}
else
# This is a workaround for the "tar u" bug in GNU tar 1.20
echo `date` "Touching symlink and directories for" ${TARBALLS[$i]}
echo `date` "Touching symlink and directories for" ${TARBALLS[$i]}
find -L ${TARBALLS[$i]} -type d | xargs touch
fi
done
N=4
for (( i = 0 ; i < ${#TARBALLS[@]} ; i++ )); do
echo `date` "Creating" ${TARBALLS[$i]}'.tar.xz'
tar -I "xz -9e" -c -h -f ${TARBALLS[$i]}.tar.xz ${TARBALLS[$i]}
((j=j%N)); ((j++==0)) && wait
{
echo `date` "Creating" ${TARBALLS[$i]}'.tar.xz'
tar -I "xz -9e" -c -h -f ${TARBALLS[$i]}.tar.xz ${TARBALLS[$i]}
} &
done
cd $OUTDIR/webstats/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment