aboutsummaryrefslogtreecommitdiff
path: root/scripts/cbc_repo_clean
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-10-02 16:01:23 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-10-02 16:01:23 -0400
commitf06bc1fd9e6518cfb623165a390485283b73dcdf (patch)
tree078b614f6c5cdb9799013549ae19ac5ce6eef98a /scripts/cbc_repo_clean
parentd724953ee21bae030124513785977d1babc68e73 (diff)
downloadcbc-f06bc1fd9e6518cfb623165a390485283b73dcdf.tar.gz
Initial commit
Diffstat (limited to 'scripts/cbc_repo_clean')
-rwxr-xr-xscripts/cbc_repo_clean27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/cbc_repo_clean b/scripts/cbc_repo_clean
new file mode 100755
index 0000000..d7dbb83
--- /dev/null
+++ b/scripts/cbc_repo_clean
@@ -0,0 +1,27 @@
+#!/bin/bash
+EXEC_PATH=$(dirname "${BASH_SOURCE[0]}")
+source "$EXEC_PATH/cbc_functions.inc"
+
+CONDA_BUILD=$(get_conda_build)
+REPO=$(get_conda_repo)
+
+if [ ! -d "$CONDA_BUILD" ]; then
+ echo "Oops... No conda-bld directory"
+ exit 1
+fi
+
+if [ ! -d "$REPO" ]; then
+ echo "No local repo found."
+ exit 1
+fi
+
+echo "This operation will destory conda's local package repository."
+echo -n "Do you wish to continue? [y/N]: "
+if [ `user_choice` -ne 0 ]; then
+ echo "Aborting."
+ exit 255
+fi
+
+cd "$REPO"
+rm -rf *.bz2
+conda index .