mirror of
https://github.com/vale981/archiso-bcachefs
synced 2025-03-05 09:31:39 -05:00
use set -e, check if package exists, install dependencies
This commit is contained in:
parent
6e53722086
commit
78d553eeec
2 changed files with 21 additions and 21 deletions
|
@ -16,13 +16,6 @@ EOF
|
||||||
# fix sudo: setrlimit(RLIMIT_CORE): Operation not permitted
|
# fix sudo: setrlimit(RLIMIT_CORE): Operation not permitted
|
||||||
echo "Set disable_coredump false" > /etc/sudo.conf
|
echo "Set disable_coredump false" > /etc/sudo.conf
|
||||||
|
|
||||||
# more dependencies
|
|
||||||
cd /tmp
|
|
||||||
su archiso
|
|
||||||
git clone https://aur.archlinux.org/libscrypt.git
|
|
||||||
cd libscrypt
|
|
||||||
makepkg -si --noconfirm
|
|
||||||
|
|
||||||
# make the bacon
|
# make the bacon
|
||||||
cd /archiso
|
cd /archiso
|
||||||
bash make_iso.sh
|
bash make_iso.sh
|
||||||
|
|
35
make_iso.sh
35
make_iso.sh
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
|
@ -16,13 +18,6 @@ echo "Removing $WORKDIR"
|
||||||
sudo rm -rf $WORKDIR
|
sudo rm -rf $WORKDIR
|
||||||
cp -r /usr/share/archiso/configs/releng/ $WORKDIR
|
cp -r /usr/share/archiso/configs/releng/ $WORKDIR
|
||||||
|
|
||||||
# echo "Setting up mkinitcpio.conf"
|
|
||||||
# sed -i 's/\(HOOKS=(.*\))/\1 bcachefs)/' $WORKDIR/mkinitcpio.conf
|
|
||||||
# cat >> $WORKDIR/mkinitcpio.conf <<EOF
|
|
||||||
# MODULES=(bcachefs)
|
|
||||||
# BINARIES=(bcachefs)
|
|
||||||
# EOF
|
|
||||||
|
|
||||||
echo "Patching build.sh"
|
echo "Patching build.sh"
|
||||||
sed -i 's/vmlinuz-linux/vmlinuz-linux-bcachefs-git/' $WORKDIR/build.sh
|
sed -i 's/vmlinuz-linux/vmlinuz-linux-bcachefs-git/' $WORKDIR/build.sh
|
||||||
|
|
||||||
|
@ -59,27 +54,39 @@ echo "====================="
|
||||||
function add_aur {
|
function add_aur {
|
||||||
CURRDIR=$(pwd)
|
CURRDIR=$(pwd)
|
||||||
URL=$1
|
URL=$1
|
||||||
|
INSTALL=$2
|
||||||
NAME=$(echo $URL | sed -r 's/^.*\.org\/(.*).git$/\1/')
|
NAME=$(echo $URL | sed -r 's/^.*\.org\/(.*).git$/\1/')
|
||||||
|
|
||||||
cd $PACKAGE_DIR
|
cd $PACKAGE_DIR
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
if [ ! -d "$NAME" ]; then
|
BUILT=( $NAME/*.pkg.* )
|
||||||
|
if (( ${#BUILT[@]} )); then
|
||||||
|
echo "$NAME already built!"
|
||||||
|
cd $NAME
|
||||||
|
else
|
||||||
|
echo "Building $NAME"
|
||||||
|
echo "=============="
|
||||||
|
|
||||||
|
rm -rf $NAME
|
||||||
git clone $URL
|
git clone $URL
|
||||||
cd $NAME
|
cd $NAME
|
||||||
makepkg -s
|
makepkg -sc
|
||||||
else
|
|
||||||
cd $NAME
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$INSTALL" = true ]; then
|
||||||
|
sudo pacman -U *.pkg.* --noconfirm --needed
|
||||||
|
fi
|
||||||
|
|
||||||
repo-add $REPO *.pkg.tar.xz
|
repo-add $REPO *.pkg.*
|
||||||
cp *.pkg.tar.xz $REPO_DIR
|
cp *.pkg.* $REPO_DIR
|
||||||
|
|
||||||
# restore
|
# restore
|
||||||
cd $CURRDIR
|
cd $CURRDIR
|
||||||
|
shopt -u nullglob
|
||||||
}
|
}
|
||||||
|
|
||||||
add_aur https://aur.archlinux.org/libscrypt-git.git
|
add_aur https://aur.archlinux.org/libscrypt-git.git true
|
||||||
add_aur https://aur.archlinux.org/bcachefs-tools-git.git
|
add_aur https://aur.archlinux.org/bcachefs-tools-git.git
|
||||||
add_aur https://aur.archlinux.org/linux-bcachefs-git.git
|
add_aur https://aur.archlinux.org/linux-bcachefs-git.git
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue