19 lines
463 B
Bash
Executable file
19 lines
463 B
Bash
Executable file
#!/usr/bin/bash
|
|
set -e
|
|
cd "$(dirname "$(realpath "$0")")"
|
|
|
|
|
|
dl_ref="$(wget -qO- https://grammalecte.net/ | grep ' <a class="button" href="zip/Grammalecte-fr-' | head -n 1 | cut -d '"' -f 4)"
|
|
if [ ".$dl_ref" = "." ]
|
|
then echo "[update_grammalecte] Failed to get latest grammalecte." && exit 1
|
|
fi
|
|
|
|
|
|
rm -fr grammalecte
|
|
mkdir -p grammalecte
|
|
wget -O ./grammalecte/grammalecte.zip "https://grammalecte.net/$dl_ref"
|
|
(
|
|
cd grammalecte
|
|
unzip grammalecte.zip
|
|
|
|
)
|