mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
30 lines
743 B
Bash
Executable File
30 lines
743 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
|
THIS_FILE=${BASH_SOURCE[0]}
|
|
LOG_LABEL=$(basename "$THIS_FILE")
|
|
THIS=${THIS:-$LOG_LABEL}
|
|
LOG_FILE=${LOG_FILE:-"$LOG_LABEL.log"}
|
|
|
|
# Logging utility function, use in place of echo.
|
|
log() {
|
|
logging log --source "$THIS_FILE" "$@"
|
|
}
|
|
|
|
################################################################################
|
|
# MAIN
|
|
################################################################################
|
|
|
|
# Setup logging file and label.
|
|
source "$SCRIPTS/hypr/logging"
|
|
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
|
|
|
script="$SCRIPTS/utils/shorten-url/create"
|
|
title="Generating short url..."
|
|
|
|
gum spin --show-output --title="$title" -- bash -c "$script $*"
|