Add case for GNU Tar as gtar (OpenBSD)

This commit is contained in:
Alexandre CATTEAU 2022-04-18 13:44:29 +02:00
parent 1ffae99efd
commit 4d3f8720e5

View File

@ -24,7 +24,12 @@ init() {
}
clearRepo() {
stream=$(tar xOf $repo_directory/$repo_db_file --wildcards */desc | awk -f $awk_rules_file)
if [ "$(uname)" = "OpenBSD" ]; then # TODO This could probably be done better (like with actually checking if tar is GNU...
gnutar="gtar"
else
gnutar="tar"
fi
stream=$($gnutar xOf $repo_directory/$repo_db_file --wildcards */desc | awk -f $awk_rules_file)
OIFS=$IFS
IFS='|'