#!/bin/bash TMP=/tmp/restool-src CWD=$PWD rm -rf $TMP ; mkdir $TMP ; cd $TMP git clone --depth 1 https://github.com/nxp-qoriq/restool cd $TMP/restool/ gitrev=$(git log -n 1 --format=format:%h .) git archive --format=tar --prefix=restool/ HEAD | xz -ze9 > $CWD/restool-$gitrev.tar.xz # Grab the man page since we don't have the "pandoc" tool in Slackware: wget https://kojipkgs.fedoraproject.org//packages/restool/2.4.0/12.443e5fa.fc42/aarch64/restool-2.4.0-12.443e5fa.fc42.aarch64.rpm rpm2cpio restool*rpm | cpio -di find . -path '*share/man*' -name '*.[0-9]*' -type f -print0 | xargs -0i cp -fav '{}' $CWD/