change crlf to lf for source updater script

This commit is contained in:
Dmitriy Kholkin 2021-02-08 23:05:01 +03:00
parent a43abfdf0c
commit ecad963664
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2

View File

@ -1,24 +1,24 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash curl nix-prefetch-git gnused jq #! nix-shell -i bash -p bash curl nix-prefetch-git gnused jq
# Run from within the directory which needs the templates.json/schemes.json # Run from within the directory which needs the templates.json/schemes.json
# Not very safe - should be cleaner & could be more parallel # Not very safe - should be cleaner & could be more parallel
# should always be permitted to run to completion # should always be permitted to run to completion
generate_sources () { generate_sources () {
out=$1 out=$1
curl "https://raw.githubusercontent.com/chriskempson/base16-${out}-source/master/list.yaml"\ curl "https://raw.githubusercontent.com/chriskempson/base16-${out}-source/master/list.yaml"\
| sed -nE "s~^([-_[:alnum:]]+): *(.*)~\1 \2~p"\ | sed -nE "s~^([-_[:alnum:]]+): *(.*)~\1 \2~p"\
| while read name src; do | while read name src; do
echo "{\"key\":\"$name\",\"value\":" echo "{\"key\":\"$name\",\"value\":"
nix-prefetch-git $src nix-prefetch-git $src
echo "}" echo "}"
done\ done\
| jq -s ".|del(.[].value.date)|from_entries"\ | jq -s ".|del(.[].value.date)|from_entries"\
> $out.json > $out.json
} }
generate_sources templates & generate_sources templates &
generate_sources schemes & generate_sources schemes &
wait wait