Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update COGNAC #70

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions oapi-cli.AppDir/AppRun → AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

for opt in "$@"; do
if [ "${opt}" == "--bash-completion" ]; then
cat "${APPDIR}/usr/bin/oapi-cli-completion.bash"
cat "${APPDIR}/usr/bin/____cli_name____-completion.bash"
exit 0
fi
done

if [ -z "$CURL_CA_BUNDLE" ]; then
source ${APPDIR}/import-ssl.sh
fi

export COGNAC_HELP_APPEND="$(echo -en '\t--bash-completion\tprint bash completion(appimage only)\n\t--appimage-help\t\tappimage helps')"

LD_LIBRARY_PATH=${APPDIR}/usr/lib/ "${APPDIR}/usr/bin/oapi-cli" "$@"
LD_LIBRARY_PATH=${APPDIR}/usr/lib/ "${APPDIR}/usr/bin/____cli_name____" "$@"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ JSON_C_RULE=./json-c-build/libjson-c.a
API_RULE_DEPEDENCIES=
OAPI_APPIMAGE_RULE_DEPEDENCIES=
APPIMAGETOOL_OPTION=
CLI_NAME=oapi-cli

include config.mk
include COGNAC/oapi-cli.mk
Expand Down Expand Up @@ -33,7 +34,7 @@ osc_sdk.h: osc-sdk-C/osc_sdk.h
osc_sdk.c: osc-sdk-C/osc_sdk.c
cp osc-sdk-C/osc_sdk.c .

oapi-cli-completion.bash: COGNAC/main.c
$(CLI_NAME)-completion.bash:
cp COGNAC/oapi-cli-completion.bash .

gen: main.c osc_sdk.h osc_sdk.c oapi-cli-completion.bash main-helper.h
Expand Down
File renamed without changes
4 changes: 2 additions & 2 deletions oapi-cli.AppDir/oapi-cli.desktop → cli.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=oapi-cli
Exec=oapi-cli
Name=____cli_name____
Exec=____cli_name____
Comment=CLI-of Outscale Granting Net Accessible Calls
Categories=Development;Network;
Terminal=true
Expand Down
3 changes: 3 additions & 0 deletions main-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct ptr_array {
*/
#define OBJ_SIZE 8

/* a is an array with a flexible size, v is the value to push,
* and pa is used to store the pointer so that we can easily free everything later.
*/
#define SET_NEXT(a,v,pa) do { \
int cnt; \
if (!a) { \
Expand Down
Loading
Loading