Skip to content
Snippets Groups Projects
Commit ddce3fdd authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Use Bash [[ ... ]] everywhere

parent 1e977978
No related merge requests found
......@@ -25,7 +25,7 @@ function _download() {
fi
local include_directories="user,themes,ajax,javascript"
if [ "${1}" = "true" ]; then
if [[ ${1} = true ]]; then
include_directories+=",task"
fi
local user_agent
......@@ -75,7 +75,7 @@ function prettify() {
function main() {
local newest_task_id
if [ -n "${1:-}" ] && [ "${1}" != -1 ]; then
if [[ -n ${1:-} && ${1} != -1 ]]; then
newest_task_id="${1}"
else
newest_task_id="$(get_newest_task_id)"
......@@ -98,7 +98,7 @@ function main() {
urls="$(generate_urls "${min}" "${max}")"
local orig_pwd="${PWD}"
local snapshot_dir=""
if [ -z "${4:-}" ]; then
if [[ -z ${4:-} ]]; then
snapshot_dir="snapshots/$(date --iso-8601=minute)"
mkdir -p "${snapshot_dir}"
else
......@@ -108,7 +108,7 @@ function main() {
echo "${min}-${max}" > range
download "${2:-true}" "${urls}"
cleanup_html "${orig_pwd}"
if [ "${3:-true}" = "true" ]; then
if [[ ${3:-true} = true ]]; then
prettify
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment