source: trunk/gui/apps/copy_rappture_examples.in @ 4503

Last change on this file since 4503 was 3177, checked in by mmc, 12 years ago

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2# -*- mode: Tcl -*-
3# ======================================================================
4#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
5#
6#  See the file "license.terms" for information on usage and
7#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8# ======================================================================
9#\
10dir=`dirname $0` ; \
11. $dir/rappture.env ; \
12exec $dir/wish "$0" $*
13
14wm withdraw .
15proc RecursiveCopy { src dest } {
16   set tail [file tail $src]
17   if { [file isdirectory $src] } {
18       set subdir [file join $dest $tail]
19       file mkdir $subdir
20       foreach item [glob -nocomplain $src/*] {
21          RecursiveCopy $item $subdir
22       }
23   } else {
24       set file [file join $dest $tail]
25       file copy $src $dest
26       file attributes $file -permissions +rw
27   }
28}
29set installdir [file normalize [file dirname [info script]]]
30set examplesdir [file join [file dirname $installdir] examples]
31set dir [tk_chooseDirectory -title "Select where to create \"examples\""]
32if  { $dir != "" } {
33   file mkdir $dir
34   RecursiveCopy $examplesdir $dir
35}
36exit 0
37
Note: See TracBrowser for help on using the repository browser.