#!/bin/sh
# shellcheck disable=SC1091
if [ ! "$(id -u)" -eq 0 ]; then
  echo "Please execute this script as root."
  exit
fi
. ./01_SetVariables.sh
rm -rf "DEST"/usr/lib/setup
chmod 755 "$DEST"/etc/rc.d/rc.espeakup
chmod 755 "$DEST"/sbin/inst
chmod 755 "$DEST"/etc/profile.d/alias.sh
chmod 755 "$DEST"/sbin/alsa-info.sh
chmod 755 "$DEST"/etc/rc.d/rc.alsa
# We have included alsa-info.sh in the initrd. To update it:
# wget --no-check-certificate -nv http://www.alsa-project.org/alsa-info.sh 2>/dev/null
chmod 644 "$DEST"/usr/share/alsa/soundcards.conf
chmod 644 "$DEST"/usr/share/alsa/utils.sh
(cd "$DEST"/usr/bin
ln -sf ../../bin/bash bash
)
