File: remove-if-ok-underlay-from-data.sh

package info (click to toggle)
moin 1.5.3-1.2etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,692 kB
  • ctags: 26,801
  • sloc: python: 32,907; java: 10,704; perl: 1,424; php: 642; makefile: 172; xml: 162; sh: 121; sed: 5
file content (9 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
#!/bin/sh

# THIS CODE PROVIDES NO WARRANTY bla bla...
# Cleanup the datadir
# cleanupdatadir.sh /path/to/underlaydir /path/to/datadir

for i in `find "$1"/pages -type d -mindepth 1 -maxdepth 1 -printf "%f\n"`; do
	find "$2"/pages/"$i" -type d -maxdepth 0 -ok rm -rf '{}' ';'
done