-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.scpt
executable file
·25 lines (20 loc) · 1.06 KB
/
install.scpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
set theWorkingDirectory to POSIX path of ((path to me as text) & "::")
-- define folder paths
set theBasketFolder to (choose folder with prompt "SELECT THE BASKET FOLDER")
set theMediaFolder to (choose folder with prompt "SELECT THE MEDIA FOLDER")
-- prepare custom scripts
try
do shell script "chmod 744 " & theWorkingDirectory & "build"
set theFolderActionScripts to (do shell script theWorkingDirectory & "build " & (POSIX path of theMediaFolder as string))
on error errorMessage
display alert "error" message (errorMessage)
end try
-- setup folder action
set theActionScript to theFolderActionScripts & "/basket.scpt"
set scriptPath to POSIX path of theActionScript--
tell application "System Events"
set theFolderAction to (make new folder action at end of folder actions with properties {path:(POSIX path of theBasketFolder)})
tell theFolderAction to make new script at end of scripts with properties {name:"media-basket", POSIX path:scriptPath}
end tell
display alert "Tidy file" message ("dyfile was installed")
-- todo: add basket to finder