aboutsummaryrefslogtreecommitdiff
path: root/publish.sh
blob: d6d4797a7082e80ee46ecd9d6abbd29b7cc7dd71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set -xe

INDIR=${1}
OUTDIR=${2}

[ ! $# -eq 2 ] && echo "Usage: $0 <input dir> <output dir>" && exit 1
[ ! -d $INDIR ] && [ ! -d $OUTDIR ]  && echo "Error: invalid input" && exit 1

for dir in $(ls -d "$INDIR"/*/); do
	cp -r $dir/* "$OUTDIR"/
done