Skip to content

Commit

Permalink
backport --appimage-version (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Sep 29, 2022
1 parent b471d2c commit c1ea750
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/runtime/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ void print_help(const char* appimage_path) {
" $XDG_CONFIG_HOME\n"
" --appimage-signature Print digital signature embedded in AppImage\n"
" --appimage-updateinfo[rmation] Print update info embedded in AppImage\n"
" --appimage-version Print version of AppImageKit\n"
" --appimage-version Print version of AppImage runtime\n"
"\n"
"Portable home:\n"
"\n"
Expand Down Expand Up @@ -1383,6 +1383,12 @@ int main(int argc, char* argv[]) {
exit(0);
}

/* Just print the runtime version and then exit */
if(arg && strcmp(arg,"appimage-version") == 0) {
fprintf(stderr,"AppImage runtime version: %s\n", GIT_COMMIT);
exit(0);
}

/* Just print the offset and then exit */
if (arg && strcmp(arg, "appimage-offset") == 0) {
printf("%zu\n", fs_offset);
Expand Down

0 comments on commit c1ea750

Please # to comment.