ncdns-repro/tools/cirrus_pack_interrupted.sh

23 lines
375 B
Bash
Executable File

#!/usr/bin/env bash
set -euxo pipefail
shopt -s failglob
pushd tmp
mkdir -p interrupted_dirs
tar -caf "interrupted_dirs.tar.gz" interrupted_dirs
CHUNKS=3
split --number=$CHUNKS interrupted_dirs.tar.gz interrupted_dirs.tar.gz.part
rm interrupted_dirs.tar.gz
for PART in interrupted_dirs.tar.gz.part* ; do
mkdir -p $PART.folder
mv $PART $PART.folder/
done
popd