]>
git.saurik.com Git - wxWidgets.git/blob - debian/unpack_examples.sh.in
3 # Unpack compressed examples from the packaged documentation
4 # into a directory where the user can compile and/or run them.
6 WX_EXAMPLES_DIR
="/usr/share/doc/wx=V-examples/examples"
9 echo "$0 [subdir [subdir] ...] dest_dir"
10 echo " subdir - a subdir of $WX_EXAMPLES_DIR to unpack."
11 echo " dest_dir - location for the unpacked examples."
13 echo "If no subdirs are supplied explicitly, all examples will be unpacked."
21 while [ $# -gt 1 ]; do
28 if [ -e $DESTDIR ]; then
29 echo "Destination $DESTDIR already exists. Cowardly exiting."
33 if [ -z "$SUBDIRS" ]; then
34 for d
in $(cd $WX_EXAMPLES_DIR 2> /dev/null && ls -d * 2> /dev/null); do
35 [ -d "$WX_EXAMPLES_DIR/$d" ] && SUBDIRS
="$SUBDIRS $d"
39 if [ -d "$WX_EXAMPLES_DIR/$d" ]; then
42 echo "Subdir $WX_EXAMPLES_DIR/$d does not exist. Skipping."
48 if [ -z "$SUBDIRS" ]; then
49 echo "Nothing to copy from $WX_EXAMPLES_DIR. Aborting."
55 echo "Copying $WX_EXAMPLES_DIR/$d to $DESTDIR"
56 cp -pr "$WX_EXAMPLES_DIR/$d" "$DESTDIR"
59 echo -n "Unpacking... "
60 find $DESTDIR -name "*.gz" -exec gunzip
{} \
;