3 # Copyright (c) Pierre Habouzit, 2007
12 target_dir
=${1:-"patches"}
14 if [ -e "$target_dir" ]; then
15 die
"Specified directory already exists"
18 trap "rm -rf \"$target_dir\"" 0
19 mkdir
-p "$target_dir"
21 get_series |
tee "$target_dir/series" |
while read p
; do
22 mkdir
-p "`dirname $target_dir/$p`" 2> /dev
/null || true
23 cp "$GUILT_DIR/$branch/$p" "$target_dir/$p"
27 echo "Series exported to \"$target_dir\" sucessfully."