Skip to content

Commit

Permalink
abort crackle setup if the submodule is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed May 5, 2022
1 parent f9c3dda commit d4f3f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crackle
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,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" ] && {
[[ ! -f "$SCRP_DIR/bin/*" ]] && err "submodule missing";
[[ $(basename $SCRP_DIR) = "bin" && -d $HOME/crackle ]] && rm -r $HOME/crackle;
[[ $(basename $SCRP_DIR) = "bin" || -f $HOME/Downloads/crackle.zip ]] && upgrade_crackle;
bashrc=$(grep crackle "$HOME"/.bashrc);
Expand Down Expand Up @@ -220,7 +221,6 @@ APT_CACHE="apt-cache -o Dir::Cache=$APTCACHE -o Dir::State=$APTSTATE -o Dir::Etc
# remove crackle from the system
[[ "$operation" = "nuke" ]] && {
transistion_crackle;
[ -d $PKG_PATH ] && rm -r $PKG_PATH;
[[ -d "$APTCACHE" ]] && rm -r "$APTCACHE";
[[ -d "$APTSTATE" ]] && rm -r "$APTSTATE";
[[ -d "$PKG_PATH" ]] && rm -r "$PKG_PATH";
Expand Down

0 comments on commit d4f3f83

Please sign in to comment.