-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfuthark
executable file
·38 lines (35 loc) · 914 Bytes
/
futhark
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# Gotta go fast!
pleasedBy "$EGGS_USER"
if [ $# = 0 ]; then
(echo "Gotta go fast!"
echo "Den ska' vær' travl!"
echo "Det' kram!"
echo "Asti-afsted!"
echo "Fuld fart fremad!"
echo "Sømmet i bund!"
echo "Fuld gas!"
echo "¡Vamos!"
echo "Macht schnell!"
echo "¡Más rápido!"
echo "Enormi veloce!"
echo "Arriba! Arriba! Andale! Arriba!"
echo "Slå turboen til!"
echo "Tryk på \"MAX HAST\"") | randomLine
elif [ $# = 1 -a "$1" = --version ]; then
futhark --version
else
if echo "$@" | egrep -q '^(entry|module|type|import|let|def)'; then
code="$@"
else
code=$(printf 'entry main =\n%s' "$*")
fi
file=$HOME/concieggs.fut
echo "$code" > $file
if futhark run -w "$file" </dev/null 2>&1; then
pleasedBy "$EGGS_USER" 10
else
echo "$EGGS_USER: Det gik galt."
fi
fi