mirror of https://github.com/vitalif/grive2
Compare commits
2 Commits
9ba76db59c
...
ccc75ba15b
Author | SHA1 | Date |
---|---|---|
Tatsh | ccc75ba15b | |
Andrew Udvare | fc65d815f7 |
|
@ -23,5 +23,14 @@ if ( HAVE_SYSTEMD )
|
|||
add_subdirectory( systemd )
|
||||
endif( HAVE_SYSTEMD )
|
||||
|
||||
find_program(
|
||||
HAVE_LAUNCHD launchd
|
||||
PATHS /sbin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
if ( HAVE_LAUNCHD )
|
||||
add_subdirectory( launchd )
|
||||
endif( HAVE_LAUNCHD )
|
||||
|
||||
add_subdirectory( libgrive )
|
||||
add_subdirectory( grive )
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
SET(GRIVE_SYNC_SH_BINARY "${CMAKE_INSTALL_PREFIX}/lib/grive/grive-sync.sh")
|
||||
|
||||
CONFIGURE_FILE(
|
||||
com.github.vitalif.grive2.grive-changes.plist.in
|
||||
com.github.vitalif.grive2.grive-changes.plist
|
||||
@ONLY
|
||||
)
|
||||
CONFIGURE_FILE(
|
||||
com.github.vitalif.grive2.grive-timer.plist.in
|
||||
com.github.vitalif.grive2.grive-timer.plist
|
||||
@ONLY
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/launchd/com.github.vitalif.grive2.grive-changes.plist
|
||||
${CMAKE_BINARY_DIR}/launchd/com.github.vitalif.grive2.grive-timer.plist
|
||||
DESTINATION
|
||||
lib/launchd
|
||||
)
|
||||
|
||||
install(
|
||||
PROGRAMS
|
||||
../systemd/grive-sync.sh
|
||||
DESTINATION
|
||||
lib/grive
|
||||
)
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.github.vitalif.grive2.grive-changes</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>@GRIVE_SYNC_SH_BINARY@</string>
|
||||
<string>listen</string>
|
||||
<string>RELATIVE PATH FROM $HOME TO SYNC HERE</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true />
|
||||
<key>StandardOutPath</key>
|
||||
<!-- Change HOME below to your $HOME path, e.g. /Users/name -->
|
||||
<string>HOME/Library/Logs/grive2.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>HOME/Library/Logs/grive2.log</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.github.vitalif.grive2.grive-timer</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>@GRIVE_SYNC_SH_BINARY@</string>
|
||||
<string>sync</string>
|
||||
<string>RELATIVE PATH FROM $HOME TO SYNC HERE</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true />
|
||||
<key>StartInterval</key>
|
||||
<!-- Every 5 minutes -->
|
||||
<integer>300</integer>
|
||||
<key>StandardOutPath</key>
|
||||
<!-- Change HOME below to your $HOME path, e.g. /Users/name -->
|
||||
<string>HOME/Library/Logs/grive2.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>HOME/Library/Logs/grive2.log</string>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue