Skip to content
Snippets Groups Projects
Select Git revision
  • 1c2dc51b76df9dba1472cc0a1c066e49d329b7d9
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
41 results

basics.rst

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    lint-sh.sh 801 B
    #!/bin/sh
    
    set -e
    
    is_scriptfile() {
    	echo "$1" | grep -q '\.sh$' || head -n1 "$1" | grep -qE '^#!(.*\<bash|/bin/sh)$'
    }
    
    is_initscript() {
    	head -n1 "$1" | grep -qxF '#!/bin/sh /etc/rc.common'
    }
    
    find contrib -type f | while read -r file; do
    	is_scriptfile "$file" || continue
    
    	echo "Checking $file"
    	shellcheck -f gcc "$file"
    done
    
    find package -type f | while read -r file; do
    	if is_scriptfile "$file"; then
    		echo "Checking $file"
    		shellcheck -f gcc -x -s sh -e SC2039,SC3043,SC3037,SC3057 "$file"
    	elif is_initscript "$file"; then
    		echo "Checking $file (initscript)"
    		shellcheck -f gcc -x -s sh -e SC2034,SC2039,SC3043,SC3037,SC3057 "$file"
    	fi
    done
    
    find scripts -type f | while read -r file; do
    	is_scriptfile "$file" || continue
    
    	echo "Checking $file"
    	shellcheck -f gcc -x "$file"
    done