aboutsummaryrefslogtreecommitdiff
path: root/scripts/download-unicode-files.sh
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2022-10-30 13:50:41 +0100
committerdundargoc <gocdundar@gmail.com>2022-11-01 18:37:21 +0100
commit502b5ee10fedc97e1455e7365a10c9bad7268c67 (patch)
tree76e48e2ff97cd7725d06f3e9a9521861584f6f12 /scripts/download-unicode-files.sh
parentaeb87f8b4a87e99c392e7ec11b29b715e1f31ac3 (diff)
downloadrneovim-502b5ee10fedc97e1455e7365a10c9bad7268c67.tar.gz
rneovim-502b5ee10fedc97e1455e7365a10c9bad7268c67.tar.bz2
rneovim-502b5ee10fedc97e1455e7365a10c9bad7268c67.zip
build(lint): add more shell scripts to lintsh
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..687b946e6f 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" .