My configuration files for Debian/Ubuntu applications
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

14 Zeilen
372 B

  1. check_dir_exists_helper() {
  2. [ -d "$1" ]
  3. }
  4. # runs the scripts and asserts it has the correct output and exit code
  5. script_run_helper() {
  6. local script="$1"
  7. local expected_output="$2"
  8. local expected_exit_code="${3:-0}"
  9. $script 2>&1 |
  10. grep "$expected_output" >/dev/null 2>&1 && # grep -q flag quits the script early
  11. [ "${PIPESTATUS[0]}" -eq "$expected_exit_code" ]
  12. }