forked from itenium-be/Mi-Ke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.ps1
43 lines (33 loc) · 1.14 KB
/
init.ps1
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Script to get you up and running
# .\init.ps1 -bare to create without example hotstrings
param ([switch]$bare = $false)
# function Create-File($file, $initial = "") {
# if (-not (Test-Path $file)) {
# echo $file
# $initial | Out-File $file -Encoding UTF8
# }
# }
function Copy-File($fileName, $moveTo) {
$destination = $fileName.Replace("-example.", ".")
$destination = "$($path)\$moveTo\$destination"
if (-not (Test-Path $destination)) {
echo "Creating $destination"
Copy-Item "$($path)\resources\init\$fileName" -Destination $destination
}
}
$path = Split-Path $SCRIPT:MyInvocation.MyCommand.Path -Parent
Copy-File "_custom-example.yml" "config"
Copy-File "mike-example.ini" "config"
Copy-File "auto-execute-example.ahk" "userland"
if (!$bare) {
Copy-File "hotstrings-example.ahk" "userland\hotstrings"
Copy-File "hotstrings-multi-login-example.ahk" "userland\hotstrings"
Copy-File "hotkeys-example.ahk" "userland\hotkeys"
}
echo "Done"
echo ""
echo "Run mike.ahk to launch the Autohotkey script"
echo "It will run in the tray menu"
if (!$bare) {
echo "Check the samples created in .\userland\ to get started with customization"
}