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='|'