Skip to content

Commit 81cb2c3

Browse files
author
nshaheed
committed
Merge branch 'main' of https://github.com/ccrma/chump
2 parents aa7e9ee + eb640a8 commit 81cb2c3

File tree

7 files changed

+629
-177
lines changed

7 files changed

+629
-177
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The ChucK Manager of Packages
1212

1313
### Linux
1414
```
15-
apt-get install libssl-dev # install dependencies
1615
make linux # build
1716
make test # run unit and integration tests
1817
make install # install chump (can require sudo)

chump-cli/main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ int main(int argc, const char **argv) {
162162
vector<string> install_package_names = parser.getCommandTargets();
163163
// uninstall package names
164164
vector<string> uninstall_package_names = parser.getCommandTargets();
165+
// force -f
166+
bool uninstall_force = parser.getCommandOption("uninstall", "-f", "--force");
165167
// update package name
166168
string update_package_name = parser.getCommandTarget("update");
167169

@@ -299,7 +301,7 @@ int main(int argc, const char **argv) {
299301
// uninstall a package by name
300302
for (string uninstall_package_name : uninstall_package_names) {
301303
try {
302-
manager->uninstall(uninstall_package_name);
304+
manager->uninstall(uninstall_package_name, uninstall_force);
303305
} catch (const std::exception &e) {
304306
cerr << e.what() << endl;
305307
}
@@ -456,6 +458,9 @@ void printUsage() {
456458
<< endl;
457459
cerr << INDENT << TC::blue("uninstall", TRUE)
458460
<< " <package> uninstall <package>" << endl;
461+
cerr << INDENT << " └─" << TC::blue(" --force/-f", TRUE)
462+
<< " └─ delete package dir (and all files inside it)"
463+
<< endl;
459464
cerr << INDENT << TC::blue("update", TRUE)
460465
<< " <package> update <package> to latest version"
461466
<< endl;

include/manager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Manager {
3434

3535
bool install(string packageName);
3636
bool install_local(fs::path pkgDefn, fs::path pkgVer, fs::path pkgZip);
37-
bool uninstall(string packageName);
37+
bool uninstall(string packageName, bool force);
3838
bool update(string packageName);
3939
bool update_manifest(); // Download a new package manifest
4040

makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ format:
7272
clang-format --style=llvm -i chumpinate/*.cpp
7373
clang-format --style=llvm -i include/*.h
7474
clang-format --style=llvm -i scripts/*.h
75-
clang-format --style=llvm -i scripts/*.cpp
75+
# clang-format --style=llvm -i scripts/*.cpp
76+
clang-format --style=llvm -i scripts/generate_manifest.cpp
7677

7778
chumpinate_pkg_linux: linux chumpinate_ckdoc
7879
cd chumpinate; chuck -s build-pkg-linux.ck

0 commit comments

Comments
 (0)