From 4d3f8720e5f1479850f2ddd1fde9a26c96751250 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Mon, 18 Apr 2022 13:44:29 +0200 Subject: [PATCH] Add case for GNU Tar as gtar (OpenBSD) --- clear-repo.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clear-repo.sh b/clear-repo.sh index ae41429..249ed03 100755 --- a/clear-repo.sh +++ b/clear-repo.sh @@ -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='|'