root/update_files.sh

Revision 854, 1.2 kB (checked in by d0nut, 3 years ago)

updates for updatescript

  • Property svn:executable set to *
Line 
1#!/bin/bash
2#
3# copies package files to wbb directory
4# parameter     (1) = directory (e.g. bbcode.google)
5#               (2) = destination directory (e.g. /var/www/wbb/wcf)
6#
7# by Torben Brodt
8
9cd $1
10
11# welcome output
12echo ""
13echo ">>> ${1} wird synchronisiert >>>>>>>>>>>>>>>>>"
14echo ""
15
16# create files.tar
17if [ -d "files" ]; then
18        cd files
19        find * ! \( -name '.*' -prune \) | cpio -pdmu $2
20        cd ..
21fi
22
23
24# create templates.tar
25if [ -d "templates" ]; then
26        cd templates
27        find * ! \( -name '.*' -prune \) | cpio -pdmu $2/templates/
28        cd ..
29fi
30
31# create acptemplates.tar
32if [ -d "acptemplates" ]; then
33        cd acptemplates
34        find * ! \( -name '.*' -prune \) | cpio -pdmu $2/acp/templates/
35        cd ..
36fi
37
38# package requirements
39if [ -d "requirements" ]; then
40        cd requirements
41        dirs=`find . -mindepth 1 -maxdepth 1 | grep -v .svn | grep -v tar.gz | sed "s/^\.\///"`
42        cd ..
43
44        for i in $dirs
45        do
46                sh ../update_files.sh requirements/$i $2
47        done
48fi
49
50# package optionals
51if [ -d "optionals" ]; then
52        cd optionals
53        dirs=`find . -mindepth 1 -maxdepth 1 | grep -v .svn | grep -v tar.gz | sed "s/^\.\///"`
54        cd ..
55
56        for i in $dirs
57        do
58                sh ../update_files.sh optionals/$i $2
59        done
60fi
61
62echo ""
63echo "<<<<<<<<<<<<<<<< ${1} wurde synchronisiert <<<"
64echo "<<<<<<<<<<<<<<<< `date` <<<"
65echo ""
Note: See TracBrowser for help on using the browser.