Compare commits
2
Commits
1472f3538b
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
544363d077 | ||
|
|
8be1e4ee93 |
No files matched your search
@@ -14,7 +14,8 @@ function Open-If-Not-Already {
|
|||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$Path,
|
[string]$Path,
|
||||||
[string]$ProcessName,
|
[string]$ProcessName,
|
||||||
[string]$WorkingDirectory = (Get-Location).Path
|
[string]$WorkingDirectory = (Get-Location).Path,
|
||||||
|
[string[]]$Args = $null
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-not $ProcessName) {
|
if (-not $ProcessName) {
|
||||||
@@ -23,7 +24,12 @@ function Open-If-Not-Already {
|
|||||||
|
|
||||||
if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) {
|
if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) {
|
||||||
Write-Output "Starting $ProcessName ($Path) ..."
|
Write-Output "Starting $ProcessName ($Path) ..."
|
||||||
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory"
|
if ($Args -eq $null) {
|
||||||
|
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory"
|
||||||
|
} else {
|
||||||
|
Write-Output "Opening with args $Args"
|
||||||
|
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" -ArgumentList "$Args"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Output "$ProcessName is already running."
|
Write-Output "$ProcessName is already running."
|
||||||
@@ -36,6 +42,6 @@ $timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
|||||||
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" commit --all --message "backup-${timestamp}"
|
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" commit --all --message "backup-${timestamp}"
|
||||||
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" push origin main
|
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" push origin main
|
||||||
|
|
||||||
Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName
|
Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName -Args $("--profile", "rec-gaming", "--collection", "rec-gaming", "--scene", "eldenring")
|
||||||
Open-If-Not-Already -Path "$ERDC_PATH"
|
Open-If-Not-Already -Path "$ERDC_PATH"
|
||||||
Open-If-Not-Already -Path "$ER_LAUCH_PATH" -ProcessName "$ER_PROCESS_NAME"
|
Open-If-Not-Already -Path "$ER_LAUCH_PATH" -ProcessName "$ER_PROCESS_NAME"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import yaml
|
||||||
|
|
||||||
|
LABEL = "leuchtturm.enable"
|
||||||
|
|
||||||
|
with open(0) as f:
|
||||||
|
res = yaml.safe_load(f)
|
||||||
|
|
||||||
|
for key, service in res["services"].items():
|
||||||
|
if "labels" not in service:
|
||||||
|
continue
|
||||||
|
labels = service["labels"]
|
||||||
|
if LABEL in labels:
|
||||||
|
print(key, end=" ")
|
||||||
Reference in new issue
Block a user