VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/linux/build_in_tmp@ 1890

Last change on this file since 1890 was 1008, checked in by vboxsync, 18 years ago

fixed eol-style

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 412 bytes
Line 
1#!/bin/sh
2
3# find a unique temp directory
4num=0
5while true; do
6 tmpdir="/tmp/vbox.$num"
7 if mkdir -m 0755 "$tmpdir" 2> /dev/null; then
8 break
9 fi
10 num=`expr $num + 1`
11 if [ $num -gt 200 ]; then
12 echo "Could not find a valid tmp directory"
13 exit 1
14 fi
15done
16
17# copy
18cp -a ${0%/*}/* $tmpdir/
19
20# make, cleanup if success
21cd "$tmpdir"
22if make "$@"; then
23 rm -rf $tmpdir
24 exit 0
25fi
26
27# failure
28exit 1
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette