#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)

# read config files
for config in /etc/profile.d/*; do
  if [ -f "$config" ] ; then
    . $config
  fi
done

# generate system-wide environment file
cat <<EOF >/run/libreelec/environment
PATH=${PATH}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
EOF
