Skip to content

Commit

Permalink
get keep_site_links parameter straight
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Feb 6, 2024
1 parent 6753e1f commit d3833d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions script/create_links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ -z ${MEM_PERC+x} ]; then
export MEM_PERC="50%"
fi

while getopts ":d:f:k:" a; do
while getopts ":d:f:k" a; do
case "${a}" in
d)
dump_date=${OPTARG}
Expand All @@ -31,7 +31,7 @@ while getopts ":d:f:k:" a; do
folder=${OPTARG}
;;
k)
keep_site_links=${OPTARG}
keep_site_links=1
;;
*)
# should not occur
Expand Down
7 changes: 4 additions & 3 deletions script/dank.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fi

# defaults
project="wiki"
keep_site_links=""
dump_time=""
folder=""
while getopts ":p:i:d:s:t:f:bkl" a; do
Expand All @@ -50,7 +51,7 @@ while getopts ":p:i:d:s:t:f:bkl" a; do
bigmem=1
;;
k)
keep_site_links=1
keep_site_links="-k"
;;
l)
links=1
Expand All @@ -76,7 +77,7 @@ if [ "$1" == "ALL" ]; then

# collect
for i in $languages; do
./script/create_links.sh -d "$dump_time" -f "$folder" -k "$keep_site_links" "$i" "$project" >> "$filename.files.txt"
./script/create_links.sh -d "$dump_time" -f "$folder" "$keep_site_links" "$i" "$project" >> "$filename.files.txt"
done

# merge
Expand All @@ -93,7 +94,7 @@ if [ "$1" == "ALL" ]; then
exit 1
fi
else
filename=$(./script/create_links.sh -d "$dump_time" -f "$folder" -k "$keep_site_links" "$1" "$project")
filename=$(./script/create_links.sh -d "$dump_time" -f "$folder" "$keep_site_links" "$1" "$project")
true > "$filename.stats.txt"
fi

Expand Down

0 comments on commit d3833d4

Please sign in to comment.