blob: 3ffa56052abaaa59df1c63110c8a9fe06d2c5700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
#
# Copyright (C) 2019 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#
ptxd_make_toolchain_cleanup() {
local sysroot_cross="$(ptxd_get_ptxconf PTXCONF_SYSROOT_CROSS)"
local sysroot_target="$(ptxd_get_ptxconf PTXCONF_SYSROOT_TARGET)"
# packages install to pkgdir anyways and this avoid empty directories
# in the final toolchain
rmdir --ignore-fail-on-non-empty \
{"${sysroot_cross}","${sysroot_target}"{,/usr}}/{etc,lib,{,s}bin,include,{,share/}man/{man*,},share}
# errors may occur when multiple toolchains are built at the same time
true
}
ptxd_make_toolchain_cleanup
|