]> CyberLeo.Net >> Repos - CDN/shlib.git/blob - example.sh
sh/stopwatch: Add 'time' verb to stopwatch, to retrieve just the times
[CDN/shlib.git] / example.sh
1 #!/bin/sh
2
3 # Source shlib
4 _root="$(dirname "${0}")"; . "${_root}/lib/sh/env.sh"
5
6 want log ask reexec
7
8 id
9
10 note This is a note.
11 log ...and a log...
12 warn ...warning...
13
14 log "Are you sure?"
15 yn || err you said no
16
17 if [ "$(id -u)" -ne 0 ]
18 then
19   note "Restart script as root"
20   reexec "${0}" "${@}"
21 fi
22
23 err the end
24