Skip to content

Commit

Permalink
Set root as owner to built file tree
Browse files Browse the repository at this point in the history
Also build tar file while building *.deb
  • Loading branch information
christian-eriksson committed Jan 4, 2021
1 parent 7d69305 commit 00c774d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ $ git clone https://github.com/christian-eriksson/blubee.git

## Build

Run `./build.sh <version>` To build `dist/blubee_<version>_all.deb` and `dist/blubee`.
To build `dist/blubee_<version>_all.deb` and `dist/blubee`, run:

```
# ./build.sh <version>
```

this script would also build a tar ball with a configured version of blubee.

## Install

Expand All @@ -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_<version>_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.
Expand Down
12 changes: 11 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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/

0 comments on commit 00c774d

Please sign in to comment.