mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 20:34:52 -06:00
Revert "Travis isn't seeing our dictionary; try not copying to tmp"
This reverts commit 972f916e35.
This commit is contained in:
+4
-4
@@ -36,9 +36,9 @@ dict_filename=dictionary.txt
|
||||
markdown_sources=(./src/*.md)
|
||||
mode="check"
|
||||
|
||||
# aspell repeatedly modifies personal dictionary when checking interactively,
|
||||
# aspell repeatedly modifies personal dictionary for some purpose,
|
||||
# so we should use a copy of our dictionary
|
||||
dict_path="/tmp/dictionary.txt"
|
||||
dict_path="/tmp/$dict_filename"
|
||||
|
||||
if [[ "$1" == "list" ]]; then
|
||||
mode="list"
|
||||
@@ -55,11 +55,11 @@ if [[ ! -f "$dict_filename" ]]; then
|
||||
cat "${markdown_sources[@]}" | aspell --ignore 3 list | sort -u >> "$dict_filename"
|
||||
elif [[ "$mode" == "list" ]]; then
|
||||
# List (default) mode: scan all files, report errors
|
||||
cp "$dict_filename" "$dict_path"
|
||||
declare -i retval=0
|
||||
|
||||
for fname in "${markdown_sources[@]}"; do
|
||||
echo "command = aspell --home-dir=. --ignore 3 --personal=\"$dict_filename\" \"$mode\" < \"$fname\""
|
||||
command=$(aspell --home-dir=. --ignore 3 --personal="$dict_filename" "$mode" < "$fname")
|
||||
command=$(aspell --ignore 3 --personal="$dict_path" "$mode" < "$fname")
|
||||
if [[ -n "$command" ]]; then
|
||||
for error in $command; do
|
||||
# TODO: Find more correct way to get line number
|
||||
|
||||
Reference in New Issue
Block a user