Skip to content

Commit cbce465

Browse files
authored
fixes for the refresh-links.sh template
These changes are what was required for the /opt/.deploy-meza/refresh-links.sh script to run without errors on my CMTE system.
1 parent d42698f commit cbce465

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/roles/mediawiki/templates/refresh-links.sh.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ for d in $do_wikis; do
3131
echo " Output log:"
3232
echo " $out_log"
3333

34-
num_pages=$(WIKI="$wiki_id" "{{ m_mediawiki | quote }}/maintenance/run showSiteStats" | grep "Total pages" | sed 's/[^0-9]*//g')
34+
num_pages=$(WIKI="$wiki_id" {{ m_mediawiki | quote }}/maintenance/run showSiteStats | grep "Total pages" | sed 's/[^0-9]*//g')
3535
end_id=0
3636
delta=2000
3737

@@ -43,7 +43,7 @@ for d in $do_wikis; do
4343
start_id=$(($end_id + 1))
4444
end_id=$(($end_id + $delta))
4545
echo "Running refreshLinks.php from $start_id to $end_id for $wiki_id"
46-
WIKI="$wiki_id" "{{ m_mediawiki | quote }}/maintenance/run refreshLinks" --e "$end_id" -- "$start_id" >> "$out_log" 2>&1
46+
WIKI="$wiki_id" {{ m_mediawiki | quote }}/maintenance/run refreshLinks --e "$end_id" -- "$start_id" >> "$out_log" 2>&1
4747

4848
# If the above command had a failing exit code
4949
if [[ $? -ne 0 ]]; then
@@ -59,7 +59,7 @@ for d in $do_wikis; do
5959
# one more unbounded refreshLinks.php starting at the last ID previously done
6060
start_id=$(($end_id + 1))
6161
echo "Running final refreshLinks.php for $wiki_id in case there are more pages beyond $num_pages"
62-
WIKI="$wiki_id" "{{ m_mediawiki | quote }}/maintenance/run refreshLinks" "$start_id" >> "$out_log" 2>&1
62+
WIKI="$wiki_id" {{ m_mediawiki | quote }}/maintenance/run refreshLinks "$start_id" >> "$out_log" 2>&1
6363

6464
# If the above command had a failing exit code
6565
if [[ $? -ne 0 ]]; then

0 commit comments

Comments
 (0)