21 lines
		
	
	
		
			553 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			553 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
 | 
						|
 | 
						|
# usebash: requiere l'utilisation de bash pour lancer ce script
 | 
						|
use_bash=1
 | 
						|
if [ -n "$BASH" ]; then
 | 
						|
    if [ `basename "$BASH"` != sh ]; then
 | 
						|
        use_bash=
 | 
						|
    fi
 | 
						|
fi
 | 
						|
if [ -n "$use_bash" ]; then
 | 
						|
    default_bash="`which bash 2>/dev/null`"
 | 
						|
    for bash in "$default_bash" /bin/bash /usr/bin/bash /usr/local/bin/bash; do
 | 
						|
        if [ -x "$bash" ]; then
 | 
						|
            exec "$bash" "$0" "$@"
 | 
						|
        fi
 | 
						|
    done
 | 
						|
    echo "error: Ce script necessite bash"
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
unset use_bash
 |