You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
321 B
15 lines
321 B
# shellcheck shell=bash
|
|
|
|
if [ -n "$__path_join_sh__" ]; then return; fi
|
|
__path_join_sh__=$(date)
|
|
|
|
path_join() {
|
|
local base=$1
|
|
local relative=$2
|
|
|
|
relative_path="$(dirname "$relative")"
|
|
file_name="$(basename "$relative")"
|
|
absolute_path="$(cd "$base" && cd "$relative_path" && pwd)"
|
|
echo "$absolute_path/$file_name"
|
|
}
|