Mercurial > vanilla
comparison core/filesystem/filesystem.sh @ 54:0ec1f2db7b32
core/filesystem: initial import, closes #1158
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 01 Mar 2019 19:04:55 +0100 |
parents | |
children | e8b7a4a381f2 |
comparison
equal
deleted
inserted
replaced
53:4270c03eaa3c | 54:0ec1f2db7b32 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 source ./filesystem.info | |
19 | |
20 set -e | |
21 | |
22 install -d $DESTDIR/etc | |
23 install -d $DESTDIR/mnt | |
24 install -d $DESTDIR/proc | |
25 install -d $DESTDIR/sys | |
26 install -d $DESTDIR/dev/pts | |
27 | |
28 install -d $DESTDIR/usr/{bin,sbin,include,lib,share,src} | |
29 install -d $DESTDIR/usr/share/man/man{1,2,3,4,5,6,7,8} | |
30 | |
31 install -d $DESTDIR/var/{log,empty,run,spool} | |
32 install -d $DESTDIR/var/lib/pkg | |
33 | |
34 install -d -m 1777 $DESTDIR/tmp | |
35 install -d -m 1777 $DESTDIR/var/tmp | |
36 | |
37 # in vanilla /bin, /sbin and /lib are symlinked to /usr | |
38 ln -sf $DESTDIR/bin $DESTDIR/usr/bin | |
39 ln -sf $DESTDIR/lib $DESTDIR/usr/lib | |
40 ln -sf $DESTDIR/sbin $DESTDIR/usr/sbin | |
41 | |
42 # static devices | |
43 mknod $DESTDIR/dev/console c 5 1 | |
44 chmod 0600 $DESTDIR/dev/console |