| Last change
 on this file since 74 was             2, checked in by Dmitry A. Kuminov, 16 years ago | 
        
          | 
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
 | 
        
          | 
              
Property                 svn:executable
 set to                 * | 
        
          | File size:
            426 bytes | 
      
      
| Line |  | 
|---|
| 1 | #!/bin/sh | 
|---|
| 2 |  | 
|---|
| 3 | FILE="$1" | 
|---|
| 4 | RES="$FILE" | 
|---|
| 5 |  | 
|---|
| 6 | if [ `echo $FILE | cut -b1` = "/" ]; then | 
|---|
| 7 | true | 
|---|
| 8 | else | 
|---|
| 9 | RES="$PWD/$FILE" | 
|---|
| 10 | test -d "$RES" && RES="$RES/" | 
|---|
| 11 | RES=`echo "$RES" | sed "s,/\(\./\)*,/,g"` | 
|---|
| 12 |  | 
|---|
| 13 | # note: this will only strip 1 /path/../ from RES, i.e. given /a/b/c/../../../, it returns /a/b/../../ | 
|---|
| 14 | RES=`echo "$RES" | sed "s,\(/[^/]*/\)\.\./,/,g"` | 
|---|
| 15 |  | 
|---|
| 16 | RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"` | 
|---|
| 17 | fi | 
|---|
| 18 | echo $RES #return | 
|---|
| 19 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.