This commit is contained in:
Liam Waldron 2023-02-17 08:46:32 -05:00
parent 92fb9c5911
commit b93bcd1181
3 changed files with 72 additions and 3 deletions

10
.gitignore vendored
View File

@ -1 +1,11 @@
# README shouldn't be included in the rootfs
README
# /usr should be completely left alone
usr/**
# Same for /home
home/**
# Ignore /etc entirely, user should edit config files if needed
etc/**

View File

@ -1,6 +1,4 @@
+--------------------+
| Everest Linux Edge |
+--------------------+
### Everest Linux Edge
Easily update an Everest system with Git.

61
tools/mkskel Executable file
View File

@ -0,0 +1,61 @@
#!/bin/sh
# mkskel - create a filesystem layout
# (C) 2023 Everest Linux
# See the GNU GPL Version 3 for copyright details
ROOT_DIR=${2}
mkdirs() {
mkdir -pv ${ROOT_DIR}/{dev,home,mnt,proc,run,srv,sys,boot,etc,lost+found}
mkdir -pv ${ROOT_DIR}/{opt,root,var,tmp,include,share}
for DIR in bin lib sbin; do
mkdir -pv ${ROOT_DIR}/${DIR}
mkdir -pv ${ROOT_DIR}/usr/${DIR}
done
case $(uname -m) in
x86_64)
ln -sv ${ROOT_DIR}/lib ${ROOT_DIR}/lib64
ln -sv ${ROOT_DIR}/usr/lib ${ROOT_DIR}/usr/lib64
;;
esac
}
helpmsg() {
printf "usage: ${0} [-h] [-d] DIRECTORY\n"
}
helpmsg_big() {
printf "${0} - create a filesystem layout"
printf "usage: ${0} [-h] [-d] DIRECTORY\n"
printf "\n"
printf "${0} {-h} Show this message\n"
printf "${0} {-d DIRECTORY} Create a filesystem layout in DIRECTORY\n"
printf "\n"
printf "This program is free software.\n"
printf "See the GNU GPL version 3 for details.\n"
}
case $1 in
-h)
helpmsg_big "$@"
exit 0
;;
-d)
mkdirs "$@"
exit 0
;;
-*)
helpmsg "$@"
exit 1
;;
*)
helpmsg "$@"
exit 1
esac
helpmsg "$@"
exit 1