Skip to content

Commit

Permalink
setup additional repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Apr 20, 2024
1 parent 4da5bc3 commit 5a1a9cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/pkgfunc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ function pkgstatus(){
[ ! $pkgstatus = "(none)" ] && stat "Apt: $1 is already the newest version \($pkgstatus\)";
}

function setup_repos(){
while read repo
do
REPOS=$(basename $repo)
if [[ -f "${PKG_PREFIX}/lib/crackle/${REPOS%.*}" ]]; then
source "${PKG_PREFIX}/lib/crackle/${REPOS%.*}";
setup_${REPOS%.*};
fi
done < <(find $APTCONFIG/sources.list.d -name "*.list")

}

function pkgsetup(){
say "configuring crackle";
[[ -d "$DPKGSTATE" ]] || {
Expand All @@ -78,6 +90,9 @@ function pkgsetup(){
[[ -d "$APTCONFIG" ]] || {
mkdir -p $APTCONFIG/preferences.d $APTCONFIG/trusted.gpg.d;
mv $PKG_PREFIX/lib/crackle/etc/sources.list.d $APTCONFIG;

setup_repos;

ln -s /etc/apt/sources.list $APTCONFIG;
[[ -n "$(ls /etc/apt/trusted.gpg.d)" ]] && ln -s /etc/apt/trusted.gpg.d/* $APTCONFIG/trusted.gpg.d/;
}
Expand Down

0 comments on commit 5a1a9cb

Please sign in to comment.