Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
1234567891011121314151617181920212223242526 |
- #!/bin/bash
- # Provides functions that are used in multiple scripts in the build process
-
- function safe_mktemp {
- if [ -x "`which mktemp`" ] ; then
- TMPDIR=`mktemp -d`
- else
- if [ -d "$TMP" ] ; then
- # We're running under Windows then use the global TMP location
- TMPDIR="$TMP/$1-`date +%s`-$$-$RANDOM"
- else
- TMPDIR="`pwd`/build/temp/$1-$$-$RANDOM"
- fi
- # this is fragile
- if [ -d "$TMPDIR" ] ; then
- echo "no suitable temp folder found"
- exit 2
- fi
- mkdir -p "$TMPDIR"
- if [ ! -d "$TMPDIR" ] ; then
- echo "no suitable temp folder found"
- exit 2
- fi
- fi
- echo $TMPDIR
- }
|