Skip to content

Commit adaed74

Browse files
author
nephros
committed
Add "save as good" to command line options
1 parent 9c1f07d commit adaed74

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/bin/patchmanager-daemon/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void help()
6161
std::cout << " patchmanager -a <Patch> : Enable and activate a Patch" << std::endl;
6262
std::cout << " patchmanager -u <Patch> : Deactivate and disable (unapply) a Patch" << std::endl;
6363
std::cout << " patchmanager --unapply-all : Deactivate and disable (unapply) all Patches" << std::endl;
64+
std::cout << " patchmanager --save-as-good : Save list of enabled Patches as 'known good'" << std::endl;
6465
std::cout << " patchmanager --daemon : Start Patchmanager as daemon" << std::endl;
6566
}
6667

src/bin/patchmanager-daemon/patchmanagerobject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,8 @@ void PatchManagerObject::process()
999999
}
10001000
} else if (args[1] == QStringLiteral("--unapply-all")) {
10011001
method = QStringLiteral("unapplyAllPatches");
1002+
} else if (args[1] == QStringLiteral("--save-as-good")) {
1003+
method = QStringLiteral("setKnownGood");
10021004
} else {
10031005
return;
10041006
}

src/tools/patchmanager-tool

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function usage() {
2323
printf "\t-A | --activate-all\t\tActivate / apply all Patches formerly marked as active.\n"
2424
printf "\t-d | --deactivate\t\tDeactivate / unapply Patches from list or file (via -f).\n"
2525
printf "\t-D | --deactivate-all\t\tDeactivate / unapply all Patches.\n"
26+
printf "\t-S | --save-as-good\t\tSave list of enabled Patches as 'known good'\n"
2627
printf "\t-f | --file <filepath>\t\tUse <filepath> for the list of Patches.\n"
2728
printf "\t-e | --export\t\t\tExport list of Patches marked as active either to STDout or (via -f) to a file.\n"
2829
printf "\t-h | --help\t\t\tPrint this help.\n"
@@ -96,6 +97,11 @@ case "$1" in
9697
shift
9798
surplus "$*"
9899
;;
100+
-S|--save-as-good)
101+
operation="--save-as-good"
102+
shift
103+
surplus "$*"
104+
;;
99105
--reset-system)
100106
operation="--reset-system"
101107
shift

0 commit comments

Comments
 (0)