Skip to content

Commit

Permalink
Add more debug info.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Oct 23, 2024
1 parent 18cd8fb commit 6449ee2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,24 @@ cli() {
# Set up command line
echo "CMD=\"\$(grep \"${PLATFORM_BIN}/\$1\" \"${bin_list}\" | head -n 1)\"" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null


# TODO: Debug, remove this
echo "echo \"CMD \$CMD\"" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

# If we find a binary on the list, execute it
echo "if [ \"\${CMD}\" != \"\" ]; then" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null
echo " if [ -z \"\${PATH-}\" ]; then export PATH=\"${PLATFORM_BIN}\"; else PATH=\"${PLATFORM_BIN}:\${PATH}\"; fi" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

# TODO: Debug, remove this
echo " echo \"EXECUTING \$@\"" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

echo " \$@" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null
echo " exit \$?" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null
echo "fi" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

# TODO: Debug, remove this
echo "echo \"EXECUTING \$@\"" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

# Execute the CLI
echo "\${PREFIX}/metacallcli \$@" | ${CMD_SUDO} tee -a "${PLATFORM_BIN}/metacall" > /dev/null

Expand Down

0 comments on commit 6449ee2

Please sign in to comment.