Get rid of obsolete setup files
This commit is contained in:
parent
7ffc082d08
commit
ab959c5eef
2 changed files with 0 additions and 24 deletions
|
|
@ -1 +0,0 @@
|
||||||
@powershell -ExecutionPolicy unrestricted %~dp0setup.ps1
|
|
||||||
23
setup.ps1
23
setup.ps1
|
|
@ -1,23 +0,0 @@
|
||||||
function new-link($link, $target) {
|
|
||||||
if (test-path $target -PathType Container) {
|
|
||||||
cmd /c mklink /j $link $target
|
|
||||||
} else {
|
|
||||||
cmd /c mklink /h $link $target
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$ignore = @(".gitignore", "setup.ps1", "setup.cmd")
|
|
||||||
|
|
||||||
Get-ChildItem . |
|
|
||||||
? { !$ignore.Contains($_.Name) } |
|
|
||||||
% {
|
|
||||||
$l = split-path -leaf $_.FullName
|
|
||||||
$p = split-path -parent (split-path -parent $_.FullName)
|
|
||||||
$t = join-path $p $l
|
|
||||||
|
|
||||||
if (test-path $t) {
|
|
||||||
remove-item -recurse -force $t
|
|
||||||
}
|
|
||||||
|
|
||||||
new-link $t $($_.FullName)
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue