rust-raspberrypi-OS-tutorials/utils/clean_all.rb
2019-10-27 23:12:20 +01:00

26 lines
524 B
Ruby
Executable File

#!/usr/bin/env ruby
# frozen_string_literal: true
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2018-2019 Andre Richter <andre.o.richter@gmail.com>
require 'fileutils'
require_relative 'helpers/tutorial_folders.rb'
def clean_all
crates = tutorial_folders
crates.each do |x|
x = File.dirname(x)
Dir.chdir(x) do
puts "Cleaning #{x}"
system('rm -rf target') || exit(1)
end
end
FileUtils.rm_rf('xbuild_sysroot')
end
clean_all if $PROGRAM_NAME == __FILE__