3 Commits

5 changed files with 57 additions and 33 deletions

12
LICENSE
View File

@@ -16,12 +16,16 @@
ANINIX ADDENDUM ANINIX ADDENDUM
Trademark Pending 2017 (https://aninix.net/irc/) Trademark 2017 (https://aninix.net/)
The "AniNIX" name and |> logo is trademark-pending as of 2017. All The "AniNIX" name and |> logo are trademarked as of 2017/11/21.
AniNIX materials can be reproduced and re-used, though you must AniNIX materials may be reproduced and re-used (though you must
contact the admins of the network to get written permission to use contact the admins of the network to get written permission to use
the AniNIX name. the AniNIX name or logo) so long as such reproduction or re-use
does not inhibit the original AniNIX use of the same.
Attribution is appreciated for other materials but not legally Attribution is appreciated for other materials but not legally
required or necessary. required or necessary.
"AniNIX" trademark serial: 87177883
|> Logo trademark serial: 87177887

View File

@@ -21,7 +21,7 @@ install: ${list} MaatIcon.png
for i in ${systemdList}; do install -m 0644 -o root $$i ${pkgdir}/usr/lib/systemd/system; done for i in ${systemdList}; do install -m 0644 -o root $$i ${pkgdir}/usr/lib/systemd/system; done
clean: clean:
cat .gitignore | sudo xargs rm -Rf git clean -fdX
uninstall: uninstall:
for i in ${list}; do rm -Rf ${installDir}/$$i; done for i in ${list}; do rm -Rf ${installDir}/$$i; done
@@ -29,7 +29,10 @@ uninstall:
rmdir -p ${pkgdir}${serverRoot}/src rmdir -p ${pkgdir}${serverRoot}/src
rmdir -p ${pkgdir}${serverRoot}/pkg rmdir -p ${pkgdir}${serverRoot}/pkg
test: clean test:
./maat -h | grep -c Usage 1>/dev/null
extendedtest: clean
sudo ./maat -u $$USER -T sudo ./maat -u $$USER -T
test -d src test -d src
test -d src/ascii-invaders test -d src/ascii-invaders

View File

@@ -28,7 +28,7 @@ validpgpkeys=()
prepare() { prepare() {
git pull git pull
make -C .. test && make -C .. clean make -C .. test
} }
build() { build() {

20
maat
View File

@@ -83,7 +83,7 @@ function BuildRepo() {
git clone "$repo" git clone "$repo"
fi fi
cd "$repodir" cd "$repodir"
git reset --hard origin &>/dev/null git clean -fdX
output="$(git pull 2>&1)" output="$(git pull 2>&1)"
if [ -n "$incremental" ] && [ $( echo "$output" | grep -c 'Already up to date.' ) -eq 1 ]; then if [ -n "$incremental" ] && [ $( echo "$output" | grep -c 'Already up to date.' ) -eq 1 ]; then
return; return;
@@ -150,12 +150,26 @@ timeout="90s"
# Stat tracking # Stat tracking
starttime=`date +%s` starttime=`date +%s`
function usage() {
### Show helptext
# param retcode: what to exit
retcode="$1"
cat <<EOM
Usage: $0
$0 -T # Extended testing
$0 -b homedir -c aurconf -u user -t timeout
Add -s to skip patching or -v for verbosity.
EOM
exit $retcode
}
# Parse arguments # Parse arguments
while getopts 'b:c:hil:st:Tu:v' OPTION; do while getopts 'b:c:hil:st:Tu:v' OPTION; do
case "${OPTION}" in case "${OPTION}" in
b) homedir="${OPTARG}" ;; b) homedir="${OPTARG}" ;;
c) aurconf="${OPTARG}" ;; c) aurconf="${OPTARG}" ;;
h) Usage; exit 0 ;; h) usage; exit 0 ;;
i) incremental=1 ;; i) incremental=1 ;;
l) cmdstring="$0"; for arg in $@; do if [ "$arg" != "-l" ] && [ "$arg" != "${OPTARG}" ]; then cmdstring="$cmdstring \"${arg}\""; fi; done; exec /bin/bash -c "$cmdstring | tee -a \"${OPTARG}\""; ;; l) cmdstring="$0"; for arg in $@; do if [ "$arg" != "-l" ] && [ "$arg" != "${OPTARG}" ]; then cmdstring="$cmdstring \"${arg}\""; fi; done; exec /bin/bash -c "$cmdstring | tee -a \"${OPTARG}\""; ;;
s) skipPatching=1 ;; s) skipPatching=1 ;;
@@ -163,7 +177,7 @@ while getopts 'b:c:hil:st:Tu:v' OPTION; do
T) export MAATTESTINGVAR=1; exec $0 -l ./testing.log -u "$deprivuser" -v -s -c <(echo https://aur.archlinux.org/ascii-invaders.git) -b . ;; T) export MAATTESTINGVAR=1; exec $0 -l ./testing.log -u "$deprivuser" -v -s -c <(echo https://aur.archlinux.org/ascii-invaders.git) -b . ;;
u) deprivuser="${OPTARG}" ;; u) deprivuser="${OPTARG}" ;;
v) set -x ;; v) set -x ;;
*) usage; exit 1 ;; *) echo "Internal GitOps CI/CD Pipeline"; usage 1 ;;
esac esac
done done

View File

@@ -0,0 +1,3 @@
#!/bin/bash
make extendedtest