You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
#!/bin/bash
|
|
#
|
|
# Initial script for UBLinux
|
|
# This script are launching before starting init from initrd script
|
|
# Current dir allways must be set to root (/)
|
|
# All system path must be relative, except initrd dirs
|
|
|
|
ENABLED=yes
|
|
[[ ${ENABLED} == "yes" ]] || exit 0
|
|
|
|
PATH=.:/:/usr/bin:/usr/local/bin:/usr/local/sbin
|
|
DEBUGMODE=no
|
|
. usr/lib/ublinux/functions
|
|
. usr/lib/ublinux/default
|
|
debug_mode "$0" "$@"
|
|
|
|
INSTALLDESKTOP="ubinstall;ubinstall.cli"
|
|
echo "${INSTALLDESKTOP}" | tr ',;' \\n | while read i; do
|
|
if [[ -f usr/share/applications/"${i}".desktop ]]; then
|
|
if ! [[ -w /memory/layer-base/0 || -d /mnt/livedata || -w /mnt/livemedia ]] || grep -q ".*-iso.sgn" <<< $(cmdline_value ub.sgnfiles); then
|
|
if ! grep -q ^Hidden=true usr/share/applications/"${i}".desktop ; then
|
|
# DESKTOPNAME=$(chroot . bash -c "xdg-user-dirs-update && xdg-user-dir DESKTOP | cut -d/ -f3")
|
|
DESKTOPNAME=$(chroot . gettext -d xdg-user-dirs "Desktop")
|
|
mkdir -p etc/skel/"${DESKTOPNAME}"
|
|
cp usr/share/applications/"${i}".desktop etc/skel/"${DESKTOPNAME}"/ && echodebug "${i}.desktop added to skel."
|
|
chmod 755 etc/skel/"${DESKTOPNAME}"/"${i}".desktop
|
|
fi
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [[ -f etc/ublinux/steam ]] ;then
|
|
. etc/ublinux/steam
|
|
rm -f etc/skel/.steam etc/skel/.local/share/Steam 2>/dev/null
|
|
[[ -z "$STEAMCONF" ]] || ln -sf "$STEAMCONF" etc/skel/.steam
|
|
[[ -z "$STEAMAPP" ]] || ln -sf "$STEAMAPP" etc/skel/.local/share/Steam
|
|
fi
|