This closes #1223

parent 7591c23a
......@@ -20,19 +20,18 @@
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
import logging
import hdlmake.fetch as fetch
from .action import Action
class CleanModules(Action):
def run(self):
logging.info("Removing fetched modules..")
remove_list = [m for m in self.modules_pool if m.source in ["svn", "git"] and m.isfetched]
remove_list = [m for m in self.modules_pool if m.source in [fetch.GIT, fetch.SVN] and m.isfetched]
remove_list.reverse() # we will remove modules in backward order
if len(remove_list):
for m in remove_list:
print("\t" + m.url + " [from: " + m.path + "]")
logging.info("... clean: " + m.url + " [from: " + m.path + "]")
m.remove_dir_from_disk()
else:
logging.info("There are no modules to be removed")
logging.info("Modules cleaned.")
\ No newline at end of file
logging.info("Modules cleaned.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment