-
Notifications
You must be signed in to change notification settings - Fork 1
/
task
executable file
·43 lines (34 loc) · 729 Bytes
/
task
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
39
40
41
42
43
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
function dev {
lume --dev "$@"
}
function watch {
lume --dev --watch "$@"
}
function serve {
lume --dev --serve "$@"
}
function build {
lume "$@"
}
function sync {
build
rsync -a --partial --progress _site/ canvas.rocks:canvas/
}
function png2webp {
cwebp -q 80 "$1" -o "$2"
}
function webm2twitter {
ffmpeg -i "$@" -pix_fmt yuv420p -vcodec libx264 -vf scale=640:-1 \
-acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k \
-ar 44100 -ac 2 -strict experimental -r 30 twitter.mp4
}
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | grep -v "^_" | cat -n
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-help}"