File: copy_datafiles.sh

package info (click to toggle)
netpanzer 0.8.7%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 34,344 kB
  • sloc: cpp: 45,217; sh: 278; objc: 259; python: 102; perl: 30; xml: 30; makefile: 15
file content (21 lines) | stat: -rwxr-xr-x 503 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/bash

if [ -z "$1" ]; then
	echo "Error: missing destination, use: $0 <destination/dir>"
	exit 1
fi

DESTDIR="$1"

[ ! -d "${DESTDIR}" ] && mkdir -p "${DESTDIR}"

echo -n "Copying files"
find cache maps pics powerups scripts sound units wads ! -type d  ! -path '*/.svn/*' ! -iname '.DS_Store' -print | \
	while read fname; do 
		DNAME="`dirname \"${fname}\"`"
		[ ! -d "${DESTDIR}/${DNAME}" ] && mkdir -p "${DESTDIR}/${DNAME}"
		cp "${fname}" "${DESTDIR}/${fname}"
		echo -n "."
	done

echo "."