24 lines
525 B
Bash
Executable File
24 lines
525 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
de_path="$(dirname "$(realpath "$BASH_SOURCE")")"
|
|
de_distro="${de_distro:="me.fier.de"}"
|
|
de_conf_global="${de_conf_global:="$de_path/user"}"
|
|
de_conf_local="${de_conf_local:="$HOME/.config/$de_distro"}"
|
|
export _de_distro="$de_distro"
|
|
|
|
if [ "$1" = "source" ]; then
|
|
return 0
|
|
fi
|
|
|
|
if ! [ -d "$de_conf_local" ]; then
|
|
cp -r "$de_conf_global" "$de_conf_local"
|
|
fi
|
|
|
|
if ! [ "$1" = "" ]; then
|
|
source "$de_conf_local/applets.d/$1" "${@}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Syntax: \"$0\" <applet> [arg 1] [arg 2] ..."
|
|
exit 1
|