init.sh
                        
                             · 593 B · Bash
                        
                    
                    
                      
                        Sin formato
                      
                    
                      
                    
                        
                          
                        
                    
                    
                
                
                
            # Create solution.
rm *.sln
dotnet new sln
find . -name *.csproj | xargs -I {} dotnet sln add {}
# Build projects
find . -name *.csproj | xargs -I {} dotnet publish {} -r win-x64 -c Release --self-contained
# Push all
for dir1 in ./*; do
    if [ -d "$dir1" ]; then
        cd "$dir1"
        for dir2 in ./*; do
            if [ -d "$dir2" ]; then
                cd "$dir2"
                git add .
                git commit -m "Fix manhours badge link"
                git push
                cd ..
            fi
        done
        # 返回到原始目录
        cd ..
    fi
done
                | 1 | # Create solution. | 
| 2 | rm *.sln | 
| 3 | dotnet new sln | 
| 4 | find . -name *.csproj | xargs -I {} dotnet sln add {} | 
| 5 | |
| 6 | # Build projects | 
| 7 | find . -name *.csproj | xargs -I {} dotnet publish {} -r win-x64 -c Release --self-contained | 
| 8 | |
| 9 | # Push all | 
| 10 | for dir1 in ./*; do | 
| 11 | if [ -d "$dir1" ]; then | 
| 12 | cd "$dir1" | 
| 13 | for dir2 in ./*; do | 
| 14 | if [ -d "$dir2" ]; then | 
| 15 | cd "$dir2" | 
| 16 | git add . | 
| 17 | git commit -m "Fix manhours badge link" | 
| 18 | git push | 
| 19 | cd .. | 
| 20 | fi | 
| 21 | done | 
| 22 | # 返回到原始目录 | 
| 23 | cd .. | 
| 24 | fi | 
| 25 | done | 
| 26 |