diff --git a/README.md b/README.md index b025949..9d19969 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,13 @@ $ git clone https://github.com/christian-eriksson/blubee.git ## Build -Run `./build.sh ` To build `dist/blubee__all.deb` and `dist/blubee`. +To build `dist/blubee__all.deb` and `dist/blubee`, run: + +``` +# ./build.sh +``` + +this script would also build a tar ball with a configured version of blubee. ## Install @@ -26,10 +32,12 @@ You are now ready to run `blubee`. ### Manual install -On a non Debian system, you can install blubee by copying the content of `dist/blubee/etc` and `dist/blubee/usr/local/bin` to your `/etc` and `/usr/local/bin`. The launcher script in `dist/blubee/usr/local/bin` may be placed in some other directory present in your `$PATH` if you wish. +On a non Debian system, you can install blubee by building blubee and extract the content of the resulting tar ball, `blubee__all.tar.gz`, to your `/etc` and `/usr/local/bin`. The launcher script in `dist/blubee/usr/local/bin` may be placed in some other directory present in your `$PATH` if you wish. During restores blubee will save files that has been changed or will be deleted by the backup. Default folder for this backup copy is `/var/local/blubee/backups`, make sure to create this directory and that the user running blubee has write permissions to this directory. +Also install the dependencies listed below. + #### Dependencies Blubee uses the following tools. If you don't have them, you'll need to install them. diff --git a/build.sh b/build.sh index 835a9e3..56505a2 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,13 @@ #!/bin/sh +relative_script_dir=${0%/*} +cd $relative_script_dir +script_path=$(pwd) + [ -z "$1" ] && echo "provide a version to build" && exit 1 version="$1" -target_root=dist +target_root=$script_path/dist [ -e $target_root ] && rm -r $target_root mkdir $target_root @@ -29,5 +33,11 @@ sed "s/Version: -/Version: $version/" package/control > $distro_dir/control cp package/conffiles package/postinst package/postrm $distro_dir +chown -R root:root "$bin_dir" +chown -R root:root "$conf_dir" + dpkg -b $package_root $target_root/blubee_${version}_all.deb +cd $package_root +tar cvzf $target_root/blubee_${version}_all.tar.gz etc/ usr/ +