From 200d97ae4b0610b1444449ecdbe49f2a409236b1 Mon Sep 17 00:00:00 2001 From: Kiran Gadhave Date: Wed, 29 May 2024 14:23:46 -0600 Subject: [PATCH] chore: postBuild exec --- .binder/postBuild | 13 +++++++++++-- .binder/requirements.txt | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.binder/postBuild b/.binder/postBuild index 8653907..08d5031 100755 --- a/.binder/postBuild +++ b/.binder/postBuild @@ -1,3 +1,12 @@ -set -ex +#!/bin/bash -rm -rf * !(examples/*) !(.binder/*) \ No newline at end of file +# Define the directories to exclude +EXCLUDE_DIRS=(".git" "examples" ".binder") + +# Convert the array to a pattern for find +EXCLUDE_PATTERN=$(printf "! -name %s -prune " "${EXCLUDE_DIRS[@]}") + +# Find and remove everything except the excluded directories +find . -maxdepth 1 -mindepth 1 \( $EXCLUDE_PATTERN \) -exec rm -rf {} + + +echo "Cleanup complete. Only the specified directories remain." \ No newline at end of file diff --git a/.binder/requirements.txt b/.binder/requirements.txt index 5bafeaa..d82ac91 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -1,7 +1,6 @@ persist_ext>=1.6.0 jupyterlab>=4.0.4 altair>=5 -paretoset pandas numpy matplotlib