You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ender3V2S1/buildroot/bin/ci_src_filter

15 lines
304 B
Bash

#!/usr/bin/env bash
# exit on first failure
set -e
SED=$(which gsed sed | head -n1)
FN="platformio.ini"
if [[ $1 == "-n" ]]; then
"${SED}" -i "s/default_src_filter/org_src_filter/" $FN
"${SED}" -i "/org_src_filter/ s/^/default_src_filter = +<src\/*>\n/" $FN
else
git checkout $FN 2>/dev/null
fi