Skip to content

Commit

Permalink
update COGNAC
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Oct 28, 2024
1 parent b62a7ac commit 4b30eae
Show file tree
Hide file tree
Showing 8 changed files with 9,942 additions and 9,941 deletions.
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____" "$@"
2 changes: 1 addition & 1 deletion COGNAC
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

0 comments on commit 4b30eae

Please sign in to comment.