123456789101112131415161718192021222324252627 |
- #!/usr/bin/env bash
- cd $SNAP
- snapctl is-connected bin
- if [ $? -eq 0 ]; then
- readarray -d '' PATHS < <(find $SNAP -maxdepth 2 -type d -name bin -path "$SNAP/shared-bin*" -print0)
- if [ "${#PATHS[@]}" -ne 0 ]; then
- for TPATH in "${PATHS[@]}"; do
- export PATH="${PATH}:${TPATH}"
- done
- fi
- fi
- readarray -d '' PATHS < <(find "$SNAP/usr/lib/$(uname -m)-linux-gnu" -maxdepth 1 -type d -print0)
- if [ "${#PATHS[@]}" -ne 0 ]; then
- for TPATH in "${PATHS[@]}"; do
- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${TPATH}"
- done
- fi
- eval $@
|