2018-06-29 08:37:33 +00:00
|
|
|
#!/usr/bin/env ruby
|
2019-09-20 13:11:22 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-10-08 07:14:16 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2019-01-12 18:45:30 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
|
2018-06-29 08:37:33 +00:00
|
|
|
|
2018-08-21 19:22:50 +00:00
|
|
|
require 'fileutils'
|
2019-09-20 13:11:22 +00:00
|
|
|
require_relative 'helpers/tutorial_folders.rb'
|
2018-08-21 19:22:50 +00:00
|
|
|
|
2018-12-29 23:20:24 +00:00
|
|
|
def clean_all
|
2019-10-17 19:49:38 +00:00
|
|
|
crates = tutorial_folders
|
2018-06-29 08:37:33 +00:00
|
|
|
|
2019-10-17 19:49:38 +00:00
|
|
|
crates.each do |x|
|
|
|
|
x = File.dirname(x)
|
|
|
|
Dir.chdir(x) do
|
|
|
|
puts "Cleaning #{x}"
|
|
|
|
system('rm -rf target') || exit(1)
|
|
|
|
end
|
2018-06-29 08:37:33 +00:00
|
|
|
end
|
2018-12-29 23:20:24 +00:00
|
|
|
|
2019-10-17 19:49:38 +00:00
|
|
|
FileUtils.rm_rf('xbuild_sysroot')
|
2018-06-29 08:37:33 +00:00
|
|
|
end
|
2018-08-21 19:22:50 +00:00
|
|
|
|
2019-01-12 18:45:30 +00:00
|
|
|
clean_all if $PROGRAM_NAME == __FILE__
|