BUGFIX: oe.build.mkstamp had a hardcoded path to the stamps dir.
[bitbake.git] / bin / build / install
1 #!/bin/sh
2
3 pkg="-"
4 mode="-"
5 type="f"
6 owner="0"
7 group="0"
8 src="-"
9 dest="-"
10 while [ $# -ge 1 ]; do
11     arg=`eval echo $1`
12     case $1 in
13     -m|--mode)
14         installcmd="$installcmd $1"
15         shift || break
16         mode="$1"
17         ;;
18     -o|--owner)
19         installcmd="$installcmd $1"
20         shift || break
21         owner="$1"
22         ;;
23     -g|--group)
24         installcmd="$installcmd $1"
25         shift || break
26         group="$1"
27         ;;
28     -d)
29         type="d"
30         ;;
31     -*)
32         ;;
33     *)
34         if [ "$#" -eq "1" ]; then
35             dest="$arg"
36         else
37             srcs="$srcs $arg"
38         fi
39         ;;
40     esac
41
42     installcmd="$installcmd $1"
43     shift || break
44 done
45
46 (
47 if [ -n "$srcs" ]; then
48     for s in $srcs; do
49         if (echo $dest|grep -q "/$"); then
50             srcdest="$dest/`basename $s`"
51         else
52             srcdest="$dest"
53         fi
54         echo "$pkg      $s      $srcdest        $type   $mode   $owner  $group"
55     done
56 else
57     echo "$pkg  $src    $dest   $type   $mode   $owner  $group"
58 fi
59 ) >> ${MANIFEST}
60
61 install $installcmd
62 exit 0