paths=()
excludes=()
+strip="strip"
+break_on_error="1"
while [ $# -gt 0 ]; do
case "${1}" in
+ --strip=*)
+ strip="${1#*=}"
+ ;;
--exclude=*)
- excludes+=( "!" "-path" "${1#*=}/*" )
+ if [ -n "${1#*=}" ]; then
+ excludes+=( "!" "-path" "${1#*=}" "!" "-path" "${1#*=}/*" )
+ fi
+ ;;
+ --ignore-errors)
+ break_on_error="0"
;;
*)
paths+=( "${1}" )
--absolute-names --dump "${file}" 2>/dev/null)"
echo "Stripping ${file}..."
- if ! strip "${args[@]}" "${file}"; then
- return 1
+ if ! "${strip}" "${args[@]}" "${file}"; then
+ return ${break_on_error}
fi
-
# Restore capabilities
if [ -n "${capabilities}" ]; then
setfattr --no-dereference --restore=<(echo "${capabilities}")