blob: c51116171fc93d425b8f6d0c35b8136abcd3ad0a (
plain)
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
|
#+title: System Management Script
#+begin_src sh
#!/bin/sh
usage ()
{
echo "Usage: $0 [-u/-i]"
}
dir="$pwd"
cd ~/.dotfiles || exit 1
while getopts ":hui" arg; do
case "$arg" in
h)
usage
cd "$dir" || exit 1
exit 0
;;
u)
make update
cd "$dir" || exit 1
exit 0
;;
i)
make install
cd "$dir" || exit 1
exit 0
;;
,*)
cd "$dir" || exit 1
exit 1
;;
esac
done
#+end_src
|