- Timestamp:
- 10/30/2013 03:44:46 PM (10 years ago)
- Branches:
- 2.4, ablfs-more, legacy, new_features, trunk
- Children:
- ef32ce5
- Parents:
- b81c951
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jhalfs
rb81c951 rbbcdeab 2 2 # $Id$ 3 3 set -e 4 # Pass trap handlers to functions 5 set -E 4 6 5 7 # VT100 colors … … 38 40 # If +e then disable text output 39 41 if [[ "$-" =~ e ]]; then 40 echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2 41 fi 42 LASTLINE="$1" 43 LASTERR="$2" 44 LASTFUNC="$3" 45 LASTSOURCE="$4" 46 # echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2 47 echo -e "\n${RED}ERROR:${GREEN} Error $LASTERR at $LASTSOURCE line ${LASTLINE}!${OFF}\n" >&2 48 fi 49 exit $LASTERR 42 50 } 43 51 … … 58 66 set -e 59 67 trap see_ya 0 60 trap simple_errorERR68 trap 'simple_error "${LINENO}" "$?" "${FUNCNAME}" "${BASH_SOURCE}"' ERR 61 69 trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18 23 62 70 #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 375 383 echo '(may take some time...)' 376 384 install_blfs_tools 2>&1 | tee -a $LOGDIR/$LOG 385 [[ ${PIPESTATUS[0]} != 0 ]] && exit 1 377 386 fi 378 387 #
Note:
See TracChangeset
for help on using the changeset viewer.