-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfs.sh
executable file
·52 lines (44 loc) · 1.58 KB
/
fs.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
45
46
47
48
49
50
51
52
#!/bin/bash
mkdir -p mnt/stuff
if [[ $? -ne 0 ]]
then
echo "failed to prepare fs, run fs_scripts/fs_reset.sh & then fs_scripts/fs_setup.sh"
exit 1
fi
echo "hello1" > mnt/stuff/a.txt
echo "hello2" > mnt/stuff/b.txt
mkdir -p mnt/stuff/a
echo "1234" > mnt/stuff/a/averylongfilename123.blah
echo "abcd" > mnt/stuff/a/NameWithCaps.blah
# copy userspace binaries
USERSPACE_BINARIES=""
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/shell.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/HelloWorld.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/TextTerminal.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/cat.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/vi.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/ls.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/echo.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/touch.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/mkdir.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/WindowServer.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/GuiTerminal.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/gui2.app"
USERSPACE_BINARIES="$USERSPACE_BINARIES userspace/ping.app"
mkdir -p mnt/bin
cp $USERSPACE_BINARIES mnt/bin
mkdir -p mnt/init
cp init_files/* mnt/init
DOOM_EXEC=doom/doomgeneric/doomgeneric/doomgeneric
DOOM_WAD=doom/doomgeneric/doomgeneric/doom1.wad
if [ -f $DOOM_EXEC ]; then
echo "Copying doom executable.."
cp $DOOM_EXEC mnt/bin/doom.app
fi
if [ -f $DOOM_WAD ]; then
echo "Copying doom WAD.."
cp $DOOM_WAD mnt/stuff/
fi
# temp fixes
rm mnt/init/kernel_*
sync