-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdotbak-dev
More file actions
executable file
·32 lines (25 loc) · 814 Bytes
/
Copy pathdotbak-dev
File metadata and controls
executable file
·32 lines (25 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# dotbak-dev - Development version (sources modules directly, no build needed!)
#
# Author: Darshit Hedpara <darshithedpara@gmail.com>
# GitHub: https://github.com/darshithedpara/dotbak
set -euo pipefail
# Script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Read version from VERSION file
if [[ -f "$SCRIPT_DIR/VERSION" ]]; then
BASE_VERSION=$(tr -d '[:space:]' < "$SCRIPT_DIR/VERSION")
DOTBAK_VERSION="dev-$BASE_VERSION"
else
DOTBAK_VERSION="dev"
fi
DOTBAK_BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
GITHUB_REPO="darshithedpara/dotbak"
export DOTBAK_VERSION
export DOTBAK_BUILD_DATE
export GITHUB_REPO
export SCRIPT_DIR
# Same module load path as the built binary
# shellcheck source=/dev/null
source "$SCRIPT_DIR/src/load_modules.sh"
main "$@"