]> Nishi Git Mirror - sp.git/commitdiff
コンフィグファイルの準備
author諏訪子 <suwako@076.moe>
Thu, 17 Oct 2024 03:08:06 +0000 (12:08 +0900)
committer諏訪子 <suwako@076.moe>
Thu, 17 Oct 2024 03:08:06 +0000 (12:08 +0900)
Makefile
sp.conf [new file with mode: 0644]

index 7490165636f51aff51685b3e70893392db98109b..6e90dfcf4e74a3b464467dc0424535518c55c1a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,13 @@ DATAPREFIX = ${PREFIX}/share
 DATAPREFIX = ${PREFIX}/data
 .endif
 
+CNFPREFIX = /etc
+.if ${UNAME_S} == "Haiku"
+CNFPREFIX = ${DATAPREFIX}
+.elif ${UNAME_S} == "FreeBSD" || ${UNAME_S} == "NetBSD" || ${UNAME_S} == "Dragonfly"
+CNFPREFIX = ${PREFIX}/etc
+.endif
+
 CC = cc
 FILES = main.c src/*.c
 
@@ -85,6 +92,10 @@ man:
        sed "s/VERSION/${VERSION}/g" < man/${NAME}-jp.1 > \
                release/man/${VERSION}/${NAME}-jp.1
 
+config:
+       mkdir -p ${DESTDIR}${DATAPREFIX}/sp/example
+       cp -f ${NAME}.conf ${DESTDIR}${DATAPREFIX}/sp/example
+
 release:
        mkdir -p release/bin/${VERSION}/${OS}/${UNAME_M}
        ${CC} -O3 ${CFLAGS} -o release/bin/${VERSION}/${OS}/${UNAME_M}/${NAME} ${FILES} \
@@ -112,4 +123,4 @@ uninstall:
        rm -rf ${DESTDIR}${MANPREFIX}/man1/${NAME}-jp.1
        rm -rf ${DESTDIR}${DATAPREFIX}/zsh/site-functions/_${NAME}
 
-.PHONY: all clean dist man release install install-zsh uninstall
+.PHONY: all clean dist man config release install install-zsh uninstall
diff --git a/sp.conf b/sp.conf
new file mode 100644 (file)
index 0000000..16c2066
--- /dev/null
+++ b/sp.conf
@@ -0,0 +1,7 @@
+language = ja
+cloud sync enabled = false
+cloud sync username = admin
+cloud sync password = 1234
+cloud sync instance = sp.076.moe
+hide password = true
+copy timeout = 45