--- /dev/null
+#!/bin/bash
+
+echo "SCRIPT IS STILL WIP, DO NOT RUN"
+
+BASEDIR=~/.local/src/bookworm-sffs/
+BUILDDIR=~/.local/src/bookworm-sffs/src/
+REPODIR=~/.local/src/bookworm-sffs/repo/
+JOBS=1
+CHROOT=bookworm-ppc64el-sbuild
+OPTS=
+
+# To be changed to the full list
+LIST=hello
+
+
+for pkg in $LIST
+do
+ mkdir -p $BUILDDIR/${pkg:0:1}
+done
+
+cd $BUILDDIR
+
+# This will loop over every package in the list and attempt to rebuild
+# If it succeeds, it will move the .deb files to their respective directory
+# in $REPODIR/$LETTER/$PKG/ for preparation to create the repo later
+# and add that package to the $BASEDIR/success file
+# if not, it will add it to $BASEDIR/failed file
+# The build logs will reside in $BUILDDIR/$LETTER/$PKG/*.log
+
+for pkg in $(BUILDDIR)
+do
+ cd $BUILDDIR/${pkg:0:1}/
+ mkdir -p $pkg && cd $BUILDDIR/${pkg:0:1}/$pkg
+ apt source $pkg
+
+ if sbuild -d $DISTRO -c $CHROOT $OPTS -j$JOBS *.dsc; then
+ echo Build successful
+ echo $pkg >> $BASEDIR/success
+ mkdir -p $REPODIR/${pkg:0:1}/$pkg/
+ mv *.deb $REPODIR/${pkg:0:1}/$pkg/
+ else
+ echo Build failed
+ echo $pkg >> $BASEDIR/failed
+ fi
+done