• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D03-May-2022327 149

READMEH A D08-May-20102.7 KiB9863

cdeploy.1H A D08-May-20105.3 KiB179178

cdeploy.shH A D08-May-201011.6 KiB545460

README

1cdeploy Readme
2==============
3
4I. Description
5
6cdeploy is a simple utility which helps deploying
7configuration files onto a system (ok, they do not
8necessarily need to be configuration files, as it just works
9with all kinds of regular files, but I wrote it for that
10purpose, so that's where the name comes from).
11
12
13II. Features
14
15* create a backup copy of the original file
16* detect user, group and mode of the original file
17* apply user, group and mode to the new file
18* easy restore of old configs if something didn't fit
19
20
21III. Installation
22
23cdeploy ships with a make file, so just type
24
25  make install
26
27to install cdeploy into /usr/local/sbin (if you
28would like to use another installation target, please
29edit the shipped Makefile to meet your needs.
30
31
32IV. Platforms
33
34cdeploy should work on all POSIX-compliant platforms
35providing a POSIX-compliant shell (/bin/sh) and a passwd and
36group file located in /etc.
37
38However, the author has tested cdeploy only on
39FreeBSD systems (7.2-RELEASE, 7.2-STABLE and 8.0-RC1).
40
41
42V. Usage
43
44Please read the shipped manpage carefully!
45
46  man cdeploy
47
48Simply run cdeploy from a configuration tree directory.
49For possible options please type
50
51  cdeploy -h
52
53cdeploy will look for configuration files within
54the current directory and below. All files that reside
55inside or below the directory you run it from will
56be deployed into the chosen destination (by default, this
57is the file system root '/').
58
59So if there is a ./etc directory in your CWD, all files
60residing inside this directory will be deployed to /etc.
61Subdirectories will be taken into account; e. g. files from
62./etc/ssh will be deployed to /etc/ssh, ./root to /root etc.
63
64
65VI. Example
66
67Create an empty directory inside your home directory (the
68name doesn't matter, thus I will reference to it as 'foo').
69
70Inside foo, create a subdirectory representing your home
71directory, e. g. ~/foo/home/<myuser>.
72
73Put a file into ~/foo/home/<myuser>, e. g. using echo:
74
75  echo "Hello Foo" > ~/foo/home/<myuser>/testfile
76
77now change into the foo directory and run cdeploy:
78
79  cd ~/foo
80  cdeploy
81
82You will now have testfile deployed into you home directory:
83
84  ls ~
85  ... testfile ...
86
87Now change the testfile inside your foo directory and deploy
88it again. You will now find the changed testfile inside your
89home directory and a backup copy of the old testfile inside
90~/.cdeploy/<date_time>/
91
92The icing on the cake: the backup directory ~/.cdeploy/<date_time>/
93is a whole and saint config tree directory. You can just go there
94and run cdeploy again and, wonder of wonders, your old
95configs are restored once again (and of course you got a
96backup of the previously installed ones which could again be
97re-deployed, but you surely figured this one out by yourself ;-))
98