File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # /bin/bash
2+ set  -e 
3+ set  -o nounset
4+ ME=$( basename " $0 " ) 
5+ 
6+ if  [ " $# "   -ne  1 ];  then 
7+ 	echo  " Usage $ME  <path to export to (must not exist)>" 
8+ 	exit  3
9+ fi 
10+ 
11+ VERSION=$( grep -o " VERSION =.*"   editor.html |  sed ' s/.*"\(.*\)";/\1/' ) 
12+ echo  " $VERSION " 
13+ 
14+ if  [ -z  " $VERSION "   ];  then 
15+ 	echo  " Version is blank, which means we can't continue" 
16+ 	exit  6
17+ fi 
18+ 
19+ LOCATION=" $1 " 
20+ LOCATION=" $LOCATION /$VERSION " 
21+ if  [ -e  " $LOCATION "   ];  then 
22+ 	echo  " You must export to a location that doesn't already exist" 
23+ 	exit  4
24+ fi 
25+ 
26+ 
27+ if  [[ -n  $( git status --porcelain)   ]];  then 
28+ 	echo  " Failing due to dirty repo" ; 
29+ 	exit  5; 
30+ fi 
31+ 
32+ 
33+ 
34+ echo  " VERSION is $VERSION " 
35+ echo  git checkout-index -a --prefix=\" " $LOCATION " \/\" 
36+ echo  git submodule foreach \' git checkout-index -a --prefix=\" " $LOCATION " \/\$ path/\"\' 
37+ echo  " Now you can run these if it all looks right" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments