Skip to content

Commit

Permalink
make crackle setup upgrade crackle
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Mar 21, 2022
1 parent dea1227 commit 89aae22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crackle
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ APT_CACHE="apt-cache -o Dir::Cache=$APTCACHE -o Dir::State=$APTSTATE -o Dir::Etc

# Installs/updates Crackle into ~/.local ~/.config and ~/.cache
[ "$operation" = "setup" ] && {
[[ $(basename $SCRP_DIR) = "bin" ]] && upgrade_crackle;
bashrc=$(grep crackle "$HOME"/.bashrc);
profile=$(grep crackle "$HOME"/.profile);

Expand Down Expand Up @@ -152,6 +153,7 @@ APT_CACHE="apt-cache -o Dir::Cache=$APTCACHE -o Dir::State=$APTSTATE -o Dir::Etc
}
cp -r "$SCRP_DIR"/bin/* "$PKG_PREFIX/bin/scripts"
if ! check_cmd patchelf; then "$SCRP_DIR"/crackle install patchelf; fi
[ ! -d $SCRP_DIR/.git ] && rm -r $SCRP_DIR;
say "Setup complete!";
exit 0;
}
Expand Down
9 changes: 9 additions & 0 deletions lib/triplet
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ checkro() {
fi
}

upgrade_crackle() {
wget https://github.com/tuxecure/crackle/releases/latest/download/crackle.zip -O $HOME/Downloads/crackle.zip
unzip $HOME/Downloads/crackle.zip -d $HOME/crackle
$HOME/crackle/crackle setup
rm $HOME/Downloads/crackle.zip;
exit 0;

}

check_cmd() {
command -v "$1" > /dev/null 2>&1
}
Expand Down

0 comments on commit 89aae22

Please sign in to comment.