action.yml 655 B

123456789101112131415161718192021222324252627
  1. name: add TTL support
  2. description: same as above
  3. runs:
  4. using: composite
  5. steps:
  6. - name: apply ttl support
  7. shell: bash
  8. run: |
  9. config=(
  10. "CONFIG_IP_NF_TARGET_TTL=y"
  11. "CONFIG_IP6_NF_TARGET_HL=y"
  12. "CONFIG_IP6_NF_MATCH_HL=y"
  13. )
  14. for config in "${configs[@]}"; do
  15. key="${config%%=*}"
  16. if grep -qE "^(${key}=|# ${key} is not set$)" "$GKI_DEFCONFIG"; then
  17. sed -i -E \
  18. -e "s/^${key}=.*/${config}/" \
  19. -e "s/^# ${key} is not set\$/${config}/" \
  20. "$GKI_DEFCONFIG"
  21. else
  22. echo "$config" >> "$GKI_DEFCONFIG"
  23. fi
  24. done