-
Notifications
You must be signed in to change notification settings - Fork 0
/
skip.sh
44 lines (42 loc) · 1.48 KB
/
skip.sh
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
44
#!/bin/bash
# 사용자 확인
if [ "$USER" = "root" ]; then
echo "root로 실행하지 마세요"
exit 1
fi
# 스크립트 입력 파라미터에 따른 동작
case "$1" in
"0")
touch ../stage0/SKIP
rm -f ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
"1")
touch ../stage0/SKIP ../stage1/SKIP
rm -f ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
"2")
touch ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES
rm -f ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
"3")
touch ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP
rm -f ../stage4/SKIP ../stage5/SKIP
;;
"4")
touch ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP
rm -f ../stage5/SKIP
;;
"full")
rm -f ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
"light")
touch ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
"rm")
rm -f ../stage0/SKIP ../stage1/SKIP ../stage2/SKIP ../stage2/SKIP_IMAGES ../stage3/SKIP ../stage4/SKIP ../stage5/SKIP
;;
*)
echo "Usage: $0 {0|1|2|3|4|full|light|rm}"
exit 1
;;
esac