Skip to content

Commit

Permalink
improve verbosity of crackle update and crackle setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Apr 25, 2024
1 parent bfb0e40 commit a05fdef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions crackle
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ APT_CACHE="apt-cache -o Dir::Cache=$APTCACHE -o Dir::State=$APTSTATE -o Dir::Etc

# Updates the apt repositories
[ "$operation" = "update" ] && {
say "checking connectivity"
wget -q --spider https://ubports.com || err "no internet connection, please run crackle update later to fetch the latest package lists";
say "Updating Cracklebin"
curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --strip-components=1 -C $PKG_PREFIX/lib/crackle
Expand Down
23 changes: 15 additions & 8 deletions lib/pkgfunc
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,34 @@ function setup_repos(){
}

function pkgsetup(){
say "configuring crackle";
say "Configuring crackle";

[[ -d "$DPKGSTATE" ]] || {
mkdir -p "$DPKGSTATE";
cp /var/lib/dpkg/status $DPKGSTATE/status;
}

[[ -d "$PKG_PREFIX/lib/crackle" ]] || mkdir -p "$PKG_PREFIX/lib/crackle";

curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --strip-components=1 -C $PKG_PREFIX/lib/crackle

[[ -d "$APTCACHE" ]] || mkdir -p "$APTCACHE";
[[ -d "$APTSTATE" ]] || mkdir -p "$APTSTATE";

[[ -d "$APTCONFIG" ]] || {
mkdir -p $APTCONFIG/sources.list.d $APTCONFIG/preferences.d $APTCONFIG/trusted.gpg.d;

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/;
}
curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --directory=$APTCONFIG/preferences.d --wildcards */etc/preferences.d/* --strip-components=3
curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --directory=$APTCONFIG/sources.list.d --wildcards */etc/sources.list.d/* --strip-components=3
setup_repos;

wget -q --spider https://ubports.com || err "no internet connection, please run crackle update later to fetch the latest package lists";
curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --directory=$APTCONFIG/preferences.d --wildcards */etc/preferences.d/* --strip-components=3
curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --directory=$APTCONFIG/sources.list.d --wildcards */etc/sources.list.d/* --strip-components=3

say "Updating cracklebin"

[[ -d "$PKG_PREFIX/lib/crackle" ]] || mkdir -p "$PKG_PREFIX/lib/crackle";

curl --disable --progress-bar -L ${CRACKLEBIN} | tar zx --strip-components=1 -C $PKG_PREFIX/lib/crackle
setup_repos;

[ -d "$APTSTATE/lists" ] || {
say "Fetching package lists...";
ensure "$SCRP_DIR"/crackle update
Expand Down

0 comments on commit a05fdef

Please sign in to comment.