File: ld_config_post_install_script.cmake.in

package info (click to toggle)
libpappsomspp 0.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,032 kB
  • sloc: cpp: 78,332; xml: 44,164; python: 668; sql: 186; sh: 33; makefile: 31
file content (17 lines) | stat: -rw-r--r-- 452 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# Safely install ld.conf entry
CONF_FILE="/etc/ld.so.conf.d/PappsoMSbindings.conf"
LIB_PATH="@CMAKE_INSTALL_PREFIX@/@PROJECT_INSTALL_LIB_QML_DIR@/PappsoMS"

if [ "$(id -u)" -ne 0 ]; then
  echo "Error: Must be run as root!" >&2
  exit 1
fi

echo "${LIB_PATH}" > "${CONF_FILE}" && ldconfig
if [ $? -eq 0 ]; then
  echo "Success: Added ${LIB_PATH} to system library paths"
else
  echo "Error: Failed to update library paths!" >&2
  exit 1
fi