~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/etc/win32/msys_tools/win2msys_path.sh

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
if [ -z "$1" ]; then
 
3
    echo "Usage: $0 <path>" >&2
 
4
    exit 1;
 
5
fi
 
6
 
 
7
MSYS_PATH=`echo "$1" | sed 's,^\([a-zA-Z]\):\\\\,/\L\1/,;s,\\\\,/,g'`
 
8
if [ -z "$MSYS_PATH" ]; then
 
9
    echo "$0: Could not translate $1 to msys format" >&2
 
10
    exit 2;
 
11
fi
 
12
 
 
13
DELBLANK=`echo "$MSYS_PATH" | sed 's, ,,g'`
 
14
 
 
15
if [ "X$DELBLANK" != "X$MSYS_PATH" ]; then
 
16
    if [ -d "$MSYS_PATH" ]; then
 
17
        C1=`(cd "$MSYS_PATH" && cmd //C "for %i in (".") do @echo %~fsi")`
 
18
        MSYS_PATH=`echo "$C1" | sed 's,^\([a-zA-Z]\):\\\\,/\L\1/,;s,\\\\,/,g'`
 
19
    else
 
20
        MSYS_DIR=`dirname "$MSYS_PATH"`
 
21
        MSYS_FILE=`basename "$MSYS_PATH"`
 
22
        if [ -d "$MSYS_DIR" ]; then
 
23
                C1=`(cd "$MSYS_DIR" && cmd //C "for %i in (".") do @echo %~fsi")`       
 
24
                BAT_FILE=/tmp/w$$.bat
 
25
                # I simply cannot get the quoting right for this, 
 
26
                # need an intermediate bat file
 
27
                cat > $BAT_FILE <<EOF
 
28
@echo off
 
29
for %%i in ("$MSYS_FILE") do @echo %%~snxi
 
30
EOF
 
31
                C2=`(cd "$MSYS_DIR" && cmd //C $BAT_FILE)`
 
32
                rm -f $BAT_FILE
 
33
                MSYS_PATH=`echo "$C1/$C2" | sed 's,^\([a-zA-Z]\):\\\\,/\L\1/,;s,\\\\,/,g;s," ", ,g'`
 
34
        fi
 
35
    fi
 
36
fi              
 
37
echo $MSYS_PATH
 
38
exit 0
 
 
b'\\ No newline at end of file'