Initial commit

This commit is contained in:
2019-08-04 23:47:12 +03:00
commit f1716e1fa2
13 changed files with 623 additions and 0 deletions

24
init/install_service.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
INIT=${1:-systemd}
CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}"
SETTINGS_PATH="${CONFIG_PATH}/photocatalog"
SYSTEMD_UNIT_PATH="${CONFIG_PATH}/systemd/user/"
if "${INIT}" == "systemd"
then
cp ./init/systemd/photocatalog.service $SYSTEMD_UNIT_PATH/photocatalog.service
if test ! -f "${SETTINGS_PATH}"
then
echo "TARGET=<specify target dir>\nMONITOR=<specify dir to monitor>\nMODE=hardlink" > "${SETTINGS_PATH}"
${EDITOR} "${SETTINGS_PATH}"
exit $?
else
exit 0
fi
fi
echo "Unknown init"
exit 2