mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-12-13 09:15:39 +00:00
chore: add new utilities and scripts for manual validations
This commit is contained in:
15
scripts/testing/run-fresh.sh
Executable file
15
scripts/testing/run-fresh.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
TEMPDIR=$(mktemp -d)
|
||||
|
||||
function cleanup {
|
||||
echo "Removing temp dir: $TEMPDIR"
|
||||
rm -rf $TEMPDIR
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "Temp dir: $TEMPDIR"
|
||||
|
||||
go run $BASEDIR/../../cmd/backrest --config-file=$TEMPDIR/config.json --data-dir=$TEMPDIR/data
|
||||
12
scripts/testing/run-in-dir.sh
Executable file
12
scripts/testing/run-in-dir.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
RUNDIR=$1
|
||||
|
||||
if [ -z "$RUNDIR" ]; then
|
||||
echo "Usage: $0 <run-dir>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go run $BASEDIR/../../cmd/backrest --config-file=$RUNDIR/config.json --data-dir=$RUNDIR
|
||||
|
||||
Reference in New Issue
Block a user