This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from crystal-linux/development
Add bootstrap build files
- Loading branch information
Showing
10 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.iso | ||
*.tar.gz | ||
crystal/airootfs/etc/pacman.conf | ||
crystal/airootfs/etc/buildstamp | ||
chrooted.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
if [[ "$2" == "" ]]; then | ||
WORKDIR=$(mktemp -d) | ||
else | ||
WORKDIR="$2" | ||
if [[ ! -d "$WORKDIR" ]]; then | ||
mkdir -p "$WORKDIR" | ||
fi | ||
fi | ||
if [[ "$1" == "--build-iso" ]]; then | ||
cp chrooted-iso.sh chrooted.sh | ||
MKARCHISO_FLAGS="-v -w $WORKDIR -o . crystal" | ||
rm -fv *.iso | ||
elif [[ "$1" == "--build-bootstrap" ]]; then | ||
cp chrooted-bootstrap.sh chrooted.sh | ||
MKARCHISO_FLAGS="-m bootstrap -v -w $WORKDIR -o . crystal" | ||
rm -fv *.tar.gz | ||
else | ||
RESULTCODE=0 | ||
if [[ "$1" == "" ]]; then | ||
echo "no option given, available options are:" | ||
RESULTCODE=1 | ||
elif [[ "$1" != "--help" ]]; then | ||
echo "option '$1' not known, available options are:" | ||
RESULTCODE=1 | ||
fi | ||
echo "--build-iso builds a crystal linux iso" | ||
echo "--build-bootstrap builds a crystal linux rootfs tarball" | ||
echo "--help display this message" | ||
exit $RESULTCODE | ||
fi | ||
cp crystal/pacman.conf crystal/airootfs/etc/. | ||
|
||
echo "Built on $(date +"%D @ %T EST")" > crystal/airootfs/etc/buildstamp | ||
|
||
time sudo ./mkarchiso $MKARCHISO_FLAGS | ||
|
||
sudo rm -rf $WORKDIR | ||
if [[ "$1" == "--build-iso" ]]; then | ||
sudo chown $USER:$USER *.iso | ||
else | ||
sudo chown $USER:$USER *.tar.gz | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
echo "Chrooted in the new system, running as $(whoami)" | ||
|
||
# Fix pacman config being put in / instead of /etc | ||
mv /pacman.conf /etc/pacman.conf | ||
|
||
# Mirrorlist | ||
reflector > /etc/pacman.d/mirrorlist | ||
|
||
# Hostname | ||
echo "crystal-live" > /etc/hostname | ||
|
||
# Locale | ||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen | ||
echo "LANG=en_US.UTF-8" > /etc/locale.conf | ||
locale-gen | ||
|
||
|
||
echo "Configured the system. Exiting chroot." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Arch packages | ||
cowsay | ||
curl | ||
openbsd-netcat | ||
openssh | ||
pacman-contrib | ||
reflector | ||
tree | ||
zsh | ||
|
||
# Things we're hosting | ||
base | ||
filesystem | ||
lsb-release | ||
neofetch | ||
pfetch | ||
sudo | ||
|
||
# Our packages | ||
amethyst | ||
|
||
# Text editors | ||
micro | ||
nano | ||
vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters