More reliable way of setting binary directory. Other method worked fine,

but Portage rejects it and I want a distro-friendly way.
This commit is contained in:
speediegq 2022-10-09 15:01:14 +02:00
parent 770e9f3e8e
commit 3086171d8f
14 changed files with 13 additions and 27 deletions

View file

@ -75,7 +75,6 @@ install: all
cp -f docs/example.* ${DESTDIR}${PREFIX}/share/speedwm/
cp -f scripts/speedwm* ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/speedwm*
cp -f status ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/status
echo "${DESTDIR}${PREFIX}/bin/" > ${DESTDIR}${PREFIX}/share/speedwm/bindir
chmod +x ./scripts/speedwm-compatcheck
chmod +x ./scripts/speedwm-dm
chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm

View file

@ -4,7 +4,7 @@
# Run speedwm-audioctrl -help for more information!
# License: GPLv3.
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
MUTE() {
# Mute for pulseaudio/pipewire

View file

@ -9,7 +9,7 @@ CHECK() {
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm/bindir) # Set binary directory to the contents of this file for NixOS support
BINDIR="$(dirname $(command -v status))/"
}
HAVE_GRID="true"

View file

@ -2,7 +2,7 @@
# speedwm-compatcheck
# compatibility checker used by 'make' when compiling speedwm.
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
# Check if xrdb exists
if [ -e "${BINDIR}xrdb" ]; then

View file

@ -2,12 +2,7 @@
# speedwm-core
# This script handles the updating and other things necessary for keybinds.
# Set binary directory if not set already.
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir) # Set binary directory to the contents of this variable.
else
BINDIR="/usr/bin/"
fi
BINDIR="$(dirname $(command -v status))/"
# update
UPDATE_SPEEDWM() {

View file

@ -7,7 +7,7 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
command -v iwctl > /dev/null || exit 1

View file

@ -11,11 +11,7 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir)
else
BINDIR="/usr/bin/"
fi
BINDIR="$(dirname $(command -v status))/"
HAVE_GRID="true"
if [ -e "$HOME/.config/speedwm-de/global/config" ]; then

View file

@ -28,11 +28,7 @@ if [ "$HAVE_GRID" = "true" ]; then
GRIDARG="-g"
fi
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir)
else
BINDIR="/usr/bin/"
fi
BINDIR="$(dirname $(command -v status))/"
EXPORTDIR=$HOME/.config/speedwm-de/powermenu
mkdir -p $EXPORTDIR

View file

@ -115,7 +115,7 @@ SWAL_SOLIDCOLOR() {
}
# Binary directory
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
SWAL_OLDWALLPAPERDIR=$SWAL_WALLPAPERDIR
# Source things

View file

@ -24,7 +24,7 @@ if [ "$HAVE_GRID" = "true" ]; then
fi
VARS() {
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
}
VARS

View file

@ -23,7 +23,7 @@ if [ "$HAVE_GRID" = "true" ]; then
GRIDARG="-g"
fi
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR="$(dirname $(command -v status))/"
EMOJILIST()
{

View file

@ -43,7 +43,7 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
DOTDIR=$HOME/.config/speedwm-de/winnav
POSITION="bottom" # top, bottom, center (your $RUNLAUNCHER must support center for this to work)

View file

@ -3,7 +3,7 @@
# External script which starts speedwm!
# https://speedie.gq/speedwm for instructions and usage!
BINDIR=$(cat /usr/share/speedwm/bindir)
BINDIR="$(dirname $(command -v status))/"
ARGS=$1
# No second argument is supported

2
status
View file

@ -238,7 +238,7 @@ fi
# Set it to /usr/bin if it was not possible to get it through /usr/share/speedwm-bindir
case "$BINDIR" in
"") BINDIR="/usr/bin" ;;
"") BINDIR="$(dirname $(command -v status))/" ;;
esac
# Systray stuff