#!/bin/bash # SPDX-FileCopyrightText: 2021-2022 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0-or-later setup() { tmp=$(mktemp) perl -pe 's/\n/\n\0/' >$tmp < $files0 # --files0-from=$files0 } par_tmpdir() { export TMPDIR="/tmp/parsort dir" rm -rf "$TMPDIR" echo Should fail echo Fail: no such dir | parsort mkdir "$TMPDIR" echo OK | parsort chmod -w "$TMPDIR" echo Should fail echo Fail: writeable | parsort rm -rf "$TMPDIR" } setup export -f $(compgen -A function | grep par_) compgen -A function | grep par_ | LC_ALL=C sort | parallel --timeout 10000% -j6 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1'