aboutsummaryrefslogtreecommitdiffstats
path: root/createdirs.sh
blob: 17bf26ab81cffcc293bf4e74eff0d717547b2a19 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
set -e

pushd "${LFS}" > /dev/null || exit 1

printf "%b" "${GRN}Creating directories${RST}... "
if [[ -f sources/createdirs ]]; then
	printf "%b" "\n  ${IGRN}Directories already created${RST}\n"
else {
	sudo mkdir -pv boot
	sudo mkdir -pv home
	sudo mkdir -pv mnt
	sudo mkdir -pv opt
	sudo mkdir -pv srv

	sudo mkdir -pv etc/opt
	sudo mkdir -pv etc/sysconfig
	sudo mkdir -pv lib/firmware
	sudo mkdir -pv media/floppy
	sudo mkdir -pv media/cdrom
	sudo mkdir -pv usr/bin
	sudo mkdir -pv usr/include
	sudo mkdir -pv usr/lib
	sudo mkdir -pv usr/sbin
	sudo mkdir -pv usr/src
	sudo mkdir -pv usr/local/bin
	sudo mkdir -pv usr/local/include
	sudo mkdir -pv usr/local/lib
	sudo mkdir -pv usr/local/sbin
	sudo mkdir -pv usr/local/src
	sudo mkdir -pv usr/share/color
	sudo mkdir -pv usr/share/dict
	sudo mkdir -pv usr/share/doc
	sudo mkdir -pv usr/share/info
	sudo mkdir -pv usr/share/locale
	sudo mkdir -pv usr/share/man
	sudo mkdir -pv usr/local/share/color
	sudo mkdir -pv usr/local/share/dict
	sudo mkdir -pv usr/local/share/doc
	sudo mkdir -pv usr/local/share/info
	sudo mkdir -pv usr/local/share/locale
	sudo mkdir -pv usr/local/share/man
	sudo mkdir -pv usr/share/misc
	sudo mkdir -pv usr/share/terminfo
	sudo mkdir -pv usr/share/zoneinfo
	sudo mkdir -pv usr/local/share/misc
	sudo mkdir -pv usr/local/share/terminfo
	sudo mkdir -pv usr/local/share/zoneinfo
	sudo mkdir -pv usr/share/man/man1
	sudo mkdir -pv usr/share/man/man2
	sudo mkdir -pv usr/share/man/man3
	sudo mkdir -pv usr/share/man/man4
	sudo mkdir -pv usr/share/man/man5
	sudo mkdir -pv usr/share/man/man6
	sudo mkdir -pv usr/share/man/man7
	sudo mkdir -pv usr/share/man/man8
	sudo mkdir -pv usr/local/share/man/man1
	sudo mkdir -pv usr/local/share/man/man2
	sudo mkdir -pv usr/local/share/man/man3
	sudo mkdir -pv usr/local/share/man/man4
	sudo mkdir -pv usr/local/share/man/man5
	sudo mkdir -pv usr/local/share/man/man6
	sudo mkdir -pv usr/local/share/man/man7
	sudo mkdir -pv usr/local/share/man/man8
	sudo mkdir -pv var/cache
	sudo mkdir -pv var/local
	sudo mkdir -pv var/log
	sudo mkdir -pv var/mail
	sudo mkdir -pv var/opt
	sudo mkdir -pv var/spool
	sudo mkdir -pv var/lib/color
	sudo mkdir -pv var/lib/misc
	sudo mkdir -pv var/lib/locate
	
	sudo ln -sfv ../run var/run
	sudo ln -sfv ../run/lock var/lock

	sudo install -v -d -m 0750 root
	sudo install -v -d -m 1777 tmp
	sudo install -v -d -m 1777 var/tmp
} >"${LFS}"/sources/createdirs.log 2>&1

	success "OK"
	touch sources/createdirs

fi

popd >/dev/null >/dev/null || exit 1