1
0
Fork 0

Add script

This commit is contained in:
Arti Zirk 2018-09-19 12:45:59 +03:00
parent 3682b3d9cd
commit 98e604d891
2 changed files with 24 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/swipl #!/usr/bin/swipl
married(liisa, joosep). married(liisa, joosep).
married(anne,vello). married(anne, vello).
mother(evelin,anne). mother(evelin,anne).
mother(mikk, anne). mother(mikk, anne).
mother(juku, anne). mother(juku, anne).
@ -8,7 +8,7 @@ mother(anne, liisa).
mother(mart, liisa). mother(mart, liisa).
female(anne). female(anne).
female(evelin). female(evelin).
female(anne). female(liisa).
male(vello). male(vello).
male(mikk). male(mikk).
male(juku). male(juku).
@ -32,10 +32,18 @@ sister(Laps, Ode):-
female(Ode). female(Ode).
uncle(Laps, Uncle):- uncle(Laps, Uncle):-
mother(Laps, Ema), (mother(Laps, Vanem); father(Laps, Vanem)),
brother(Ema, Uncle). brother(Vanem, Uncle).
uncle(Laps, Uncle):- aunt(Laps, Aunt):-
father(Laps, Isa), (mother(Laps, Vanem); father(Laps, Vanem)),
brother(Isa, Uncle). sister(Vanem, Aunt).
grandmother(Laps, GM):-
(mother(Laps, Vanem); father(Laps, Vanem)),
mother(Vanem, GM).
grandfather(Laps, GF):-
(mother(Laps, Vanem); father(Laps, Vanem)),
father(Vanem, GF).

9
auto_commit.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
while true; do
if git diff --exit-code --name-only; then
sleep 1
else
git commit -a --amend -C HEAD && git push --force
fi
done