aboutsummaryrefslogtreecommitdiff
path: root/scripts/download-unicode-files.sh
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /scripts/download-unicode-files.sh
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'scripts/download-unicode-files.sh')
-rwxr-xr-xscripts/download-unicode-files.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/scripts/download-unicode-files.sh b/scripts/download-unicode-files.sh
index 4482cefa34..f0fd4c66ea 100755
--- a/scripts/download-unicode-files.sh
+++ b/scripts/download-unicode-files.sh
@@ -3,11 +3,12 @@
set -e
data_files="UnicodeData.txt CaseFolding.txt EastAsianWidth.txt"
emoji_files="emoji-data.txt"
+files="'$data_files $emoji_files'"
UNIDIR_DEFAULT=src/unicode
DOWNLOAD_URL_BASE_DEFAULT='http://unicode.org/Public'
-if test x$1 = 'x--help' ; then
+if test "$1" = '--help' ; then
echo 'Usage:'
echo " $0[ TARGET_DIRECTORY[ URL_BASE]]"
echo
@@ -16,6 +17,7 @@ if test x$1 = 'x--help' ; then
echo
echo "Default target directory is $PWD/${UNIDIR_DEFAULT}."
echo "Default URL base is ${DOWNLOAD_URL_BASE_DEFAULT}."
+ exit 0
fi
UNIDIR=${1:-$UNIDIR_DEFAULT}
@@ -23,21 +25,12 @@ DOWNLOAD_URL_BASE=${2:-$DOWNLOAD_URL_BASE_DEFAULT}
for filename in $data_files ; do
curl -L -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/UNIDATA/$filename"
- (
- cd "$UNIDIR"
- git add $filename
- )
+ git -C "$UNIDIR" add "$filename"
done
for filename in $emoji_files ; do
curl -L -o "$UNIDIR/$filename" "$DOWNLOAD_URL_BASE/UNIDATA/emoji/$filename"
- (
- cd "$UNIDIR"
- git add $filename
- )
+ git -C "$UNIDIR" add "$filename"
done
-(
- cd "$UNIDIR"
- git commit -m "feat: update unicode tables" -- $files
-)
+git -C "$UNIDIR" commit -m "feat: update unicode tables" .