-
Notifications
You must be signed in to change notification settings - Fork 8
/
DKBuilder.ps1
26 lines (18 loc) · 1015 Bytes
/
DKBuilder.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
###### DKBuilder ######
#$ENABLE_dk_debugFunc = 1
###### DKINIT ######
$DKSCRIPT_PATH = $Script:MyInvocation.MyCommand.Path
Copy-Item "$DKSCRIPT_PATH" -Destination "$env:TMP"
$DKHTTP_DKPOWERSHELL_FUNCTIONS_DIR = "https://raw.githubusercontent.com/aquawicket/Digitalknob/Development/DKPowershell/functions"
$DKPOWERHELL_DIR = "$PWD/DKPowershell"
$DKPOWERHELL_FUNCTIONS_DIR = "${DKPOWERHELL_DIR}/functions"
if(!(Test-Path $DKPOWERHELL_DIR)){ New-Item -Path $DKPOWERHELL_DIR -ItemType Directory }
if(!(Test-Path $DKPOWERHELL_FUNCTIONS_DIR)){ New-Item -Path $DKPOWERHELL_FUNCTIONS_DIR -ItemType Directory }
if(!(Test-Path $DKPOWERHELL_FUNCTIONS_DIR/DK.ps1)){
Invoke-WebRequest -URI "$DKHTTP_DKPOWERSHELL_FUNCTIONS_DIR/DK.ps1" -OutFile $DKPOWERHELL_FUNCTIONS_DIR/DK.ps1
}
. $DKPOWERHELL_FUNCTIONS_DIR/DK.ps1
if($DKLOADED){exit} else{ $global:DKLOADED=1 } # ignore the fork process that will return from DK.ps1 above
###### Load Main Program ######
dk_call dk_buildMain
Read-Host -Prompt "Press Enter to exit"