Skip to content

Commit

Permalink
refactor check release code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed Apr 11, 2024
1 parent 94ee1e5 commit 643fcbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crackle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ else
source "$SCRP_DIR/lib/triplet";
fi

if [[ -z "$CI" ]]; then check_release "focal"; fi

if [[ -z "$CI" ]]; then checkpath; fi
# Root check
if [[ -z "$CI" ]]; then root_check; fi
Expand Down
6 changes: 6 additions & 0 deletions lib/triplet
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ rm_rorw(){
rm $PKG_PREFIX/bin/remount
err "remounting failed! crackle works best on a readonly rootfs";
}

check_release(){
if [[ ! $(lsb_release -cs) = "$1" ]]; then
err "$(lsb_release -cs) is not supported";
fi
}
checkro() {
if [[ $(rorw) = "rw" && $(lsb_release -cs) = "focal" ]]; then
echo "remounting rootfs as readonly....";
Expand Down

0 comments on commit 643fcbd

Please sign in to comment.