feat: Minor changes
This commit is contained in:
parent
f779aa82b5
commit
2bf83b6ddb
@ -25,13 +25,13 @@ __tar_options='-acf'
|
||||
__tar_exclude=
|
||||
__name_date_fmt='_%Y%m%d-%H%M'
|
||||
__compression='gzip'
|
||||
BBLIBRARY="${BBLIBRARY:-./lib}"
|
||||
LIBRARY="${LIBRARY:-./lib}"
|
||||
|
||||
# Source library
|
||||
if [ -f "$BBLIBRARY/lib.sh" ]; then
|
||||
. "$BBLIBRARY/lib.sh"
|
||||
if [ -f "$LIBRARY/lib.sh" ]; then
|
||||
. "$LIBRARY/lib.sh"
|
||||
else
|
||||
echo "Error: Cannot source library from $BBLIBRARY" >&2
|
||||
echo "Error: Cannot source library from $LIBRARY" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -49,7 +49,7 @@ Options:
|
||||
-V, --version print version and exit.
|
||||
|
||||
Environment:
|
||||
BBLIBRARY path to bb library [current: $BBLIBRARY]
|
||||
LIBRARY path to bb library [current: $LIBRARY]
|
||||
EOF
|
||||
}
|
||||
|
||||
@ -140,24 +140,24 @@ for script in "${__args[@]}"; do
|
||||
|
||||
# Run prepare() before all if set
|
||||
if is_function_set prepare; then
|
||||
echo -e "Run \e[1mprepare()\e[0m ..." | log -p
|
||||
echo -e "Run \e[1mprepare()\e[0m" | log -p
|
||||
prepare
|
||||
unset prepare
|
||||
fi
|
||||
|
||||
# Run user defined backup() if set or builtin_backup()
|
||||
if is_function_set backup; then
|
||||
echo -e "Run \e[1mbackup()\e[0m ..." | log -p
|
||||
echo -e "Run \e[1mbackup()\e[0m" | log -p
|
||||
backup
|
||||
unset backup
|
||||
else
|
||||
echo -e "Run \e[1mbuiltin_backup()\e[0m ..." | log -p
|
||||
echo -e "Run \e[1mbuiltin_backup()\e[0m" | log -p
|
||||
builtin_backup
|
||||
fi
|
||||
|
||||
# Run post backup function if set
|
||||
if is_function_set finalise; then
|
||||
echo -e "Run \e[1mfinalise()\e[0m ..." | log -p
|
||||
echo -e "Run \e[1mfinalise()\e[0m" | log -p
|
||||
finalise
|
||||
unset finalise
|
||||
fi
|
||||
|
@ -98,7 +98,7 @@ builtin_backup() {
|
||||
# ---------------------------------------------------------- #
|
||||
|
||||
gen_backup_name() {
|
||||
# Generate backup file name. Return (echo) string.
|
||||
# Generate backup file name. Write resulting string to STDOUT.
|
||||
#
|
||||
# Usage: gen_backup_name NAME_EXT
|
||||
|
||||
|
@ -22,7 +22,7 @@ handler::cp() {
|
||||
#
|
||||
# Usage: handler::cp URI
|
||||
|
||||
log "Run handler handler::cp() ..."
|
||||
log "Run handler handler::cp()"
|
||||
|
||||
local uri
|
||||
local dst_path
|
||||
|
@ -21,7 +21,7 @@ handler::tar() {
|
||||
#
|
||||
# Usage: handler::tar URI
|
||||
|
||||
log "Run handler handler::tar() ..."
|
||||
log "Run handler handler::tar()"
|
||||
|
||||
local uri
|
||||
local src_path
|
||||
|
@ -16,11 +16,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
BBLIBRARY="${BBLIBRARY:-./lib}"
|
||||
LIBRARY="${LIBRARY:-./lib}"
|
||||
|
||||
. "$BBLIBRARY/common.sh"
|
||||
. "$BBLIBRARY/backup.sh"
|
||||
. "$BBLIBRARY/source.sh"
|
||||
. "$BBLIBRARY/uri.sh"
|
||||
. "$BBLIBRARY/handlers/tar.sh"
|
||||
. "$BBLIBRARY/handlers/cp.sh"
|
||||
. "$LIBRARY/common.sh"
|
||||
. "$LIBRARY/backup.sh"
|
||||
. "$LIBRARY/source.sh"
|
||||
. "$LIBRARY/uri.sh"
|
||||
. "$LIBRARY/handlers/tar.sh"
|
||||
. "$LIBRARY/handlers/cp.sh"
|
||||
|
Loading…
Reference in New Issue
Block a user