-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: use double quotes * fix: use $(...) * fix: remove redundant 'cd -' * style: avoid using $? * style: avoid using $? * fix: revert changes * fix: use safe cd
- Loading branch information
Showing
11 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
tail -n +2 ../../docs/image_attributions.csv | while read -r photo_description; do \ | ||
./scripts/fetchPhoto.sh $photo_description; \ | ||
./scripts/fetchPhoto.sh "$photo_description"; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
wget "$1" -O temp.zip | ||
unzip temp.zip "*/course/*" -d ../../courses/$2 | ||
mv ../../courses/$2/*/course/* ../../courses/$2 | ||
unzip temp.zip "*/course/*" -d ../../courses/"$2" | ||
mv ../../courses/"$2"/*/course/* ../../courses/"$2" | ||
rm temp.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#!/bin/bash | ||
|
||
echo -en "⏳ Exporting course $1" | ||
cd ./apps/librelingo_json_export/ > /dev/null | ||
poetry run export-cli ../../courses/$1 ../../apps/web/src/courses/$1 | ||
cd ./apps/librelingo_json_export/ || | ||
{ | ||
echo -en "\r⚠️ Wrong folder structure" | ||
exit 1 | ||
} | ||
poetry run export-cli ../../courses/"$1" ../../apps/web/src/courses/"$1" | ||
if [ $? -eq 0 ]; then | ||
echo -en "\r✅ Exported course $1" | ||
else | ||
echo -en "\r⚠️ Couldn't export course $1" | ||
exit 1 | ||
fi | ||
cd - > /dev/null | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
for d in ./courses/*/ ; do | ||
d=$(echo $d | sed 's/[^/]*\/[^/]*\///' | sed 's/\///') | ||
./scripts/updateAudioForYamlCourse.sh $d "$@" | ||
d=$(echo "$d" | sed 's/[^/]*\/[^/]*\///' | sed 's/\///') | ||
./scripts/updateAudioForYamlCourse.sh "$d" "$@" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#!/bin/bash | ||
|
||
echo -en "⏳ Updating audio for course $1" | ||
cd ./apps/librelingo_audios/ > /dev/null | ||
poetry run python librelingo_audios/cli.py ../../courses/$1 ../../apps/web/static/voice $1 "${@:2}" | ||
cd ./apps/librelingo_audios/ || | ||
{ | ||
echo -en "\r⚠️ Wrong folder structure" | ||
exit 1 | ||
} | ||
poetry run python librelingo_audios/cli.py ../../courses/"$1" ../../apps/web/static/voice "$1" "${@:2}" | ||
if [ $? -eq 0 ]; then | ||
echo -en "\r✅ Updated audio for course $1" | ||
else | ||
echo -en "\r⚠️ Couldn't update audio for course $1" | ||
fi | ||
cd - > /dev/null | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/bin/bash | ||
|
||
for directory in $(find apps/ -name pyproject.toml | xargs -n1 dirname); do | ||
echo "Updating README.md for Python package '$(basename $directory)'..." | ||
cd $directory | ||
echo "Updating README.md for Python package '$(basename "$directory")'..." | ||
cd "$directory" || | ||
{ | ||
echo -en "\r⚠️ Could not enter $directory" | ||
exit 1 | ||
} | ||
poetry install | ||
make README.md -B $1 | ||
make README.md -B "$1" | ||
cd - | ||
echo | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters