mirror of
https://github.com/vale981/archiso-bcachefs
synced 2025-03-04 17:11: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
|
||||
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
|
||||
cd /archiso
|
||||
bash make_iso.sh
|
||||
|
|
35
make_iso.sh
35
make_iso.sh
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd $DIR
|
||||
|
||||
|
@ -16,13 +18,6 @@ echo "Removing $WORKDIR"
|
|||
sudo rm -rf $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"
|
||||
sed -i 's/vmlinuz-linux/vmlinuz-linux-bcachefs-git/' $WORKDIR/build.sh
|
||||
|
||||
|
@ -59,27 +54,39 @@ echo "====================="
|
|||
function add_aur {
|
||||
CURRDIR=$(pwd)
|
||||
URL=$1
|
||||
INSTALL=$2
|
||||
NAME=$(echo $URL | sed -r 's/^.*\.org\/(.*).git$/\1/')
|
||||
|
||||
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
|
||||
cd $NAME
|
||||
makepkg -s
|
||||
else
|
||||
cd $NAME
|
||||
makepkg -sc
|
||||
fi
|
||||
|
||||
if [ "$INSTALL" = true ]; then
|
||||
sudo pacman -U *.pkg.* --noconfirm --needed
|
||||
fi
|
||||
|
||||
repo-add $REPO *.pkg.tar.xz
|
||||
cp *.pkg.tar.xz $REPO_DIR
|
||||
repo-add $REPO *.pkg.*
|
||||
cp *.pkg.* $REPO_DIR
|
||||
|
||||
# restore
|
||||
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/linux-bcachefs-git.git
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue