mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-06 21:49:40 +02:00
archive-fonts: Make PWD independent
[why] Scripts should run regardless of current working directory. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
6b49625585
commit
c4a3e0249e
@ -12,13 +12,12 @@
|
||||
set -e
|
||||
|
||||
LINE_PREFIX="# [Nerd Fonts] "
|
||||
scripts_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/"
|
||||
parent_dir="${PWD}/../../"
|
||||
outputdir=$scripts_root_dir../../archives
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}/../..")" >/dev/null 2>&1 || exit && pwd -P)"
|
||||
outputdir=${root_dir}/archives
|
||||
|
||||
mkdir -p "$outputdir"
|
||||
|
||||
cd "$scripts_root_dir/../../patched-fonts/" || {
|
||||
cd "${root_dir}/patched-fonts/" || {
|
||||
echo >&2 "$LINE_PREFIX Could not find patched fonts directory"
|
||||
exit 1
|
||||
}
|
||||
@ -37,7 +36,7 @@ fi
|
||||
# create a mini readme with basic info on Nerd Fonts project
|
||||
touch "$outputdir/readme.md"
|
||||
mini_readme="$outputdir/readme.md"
|
||||
cat "$parent_dir/src/archive-readme.md" >> "$mini_readme"
|
||||
cat "$root_dir/src/archive-readme.md" >> "$mini_readme"
|
||||
|
||||
# clear out the directory zips
|
||||
find "${outputdir:?}" -name "$search_pattern" -type f -delete
|
||||
|
Loading…
Reference in New Issue
Block a user