github.com/metacubex/mihomo@v1.18.5/.github/rename-cgo.sh (about)

     1  #!/bin/bash
     2  
     3  FILENAMES=$(ls)
     4  for FILENAME in $FILENAMES
     5  do
     6      if [[ $FILENAME =~ "darwin-10.16-arm64" ]];then
     7          echo "rename darwin-10.16-arm64 $FILENAME"
     8          mv $FILENAME mihomo-darwin-arm64-cgo
     9      elif [[ $FILENAME =~ "darwin-10.16-amd64" ]];then
    10          echo "rename darwin-10.16-amd64 $FILENAME"
    11          mv $FILENAME mihomo-darwin-amd64-cgo
    12      elif [[ $FILENAME =~ "windows-4.0-386" ]];then
    13          echo "rename windows 386 $FILENAME"
    14          mv $FILENAME mihomo-windows-386-cgo.exe
    15      elif [[ $FILENAME =~ "windows-4.0-amd64" ]];then
    16          echo "rename windows amd64 $FILENAME"
    17          mv $FILENAME mihomo-windows-amd64-cgo.exe
    18      elif [[ $FILENAME =~ "mihomo-linux-arm-5" ]];then
    19          echo "rename mihomo-linux-arm-5 $FILENAME"
    20          mv $FILENAME mihomo-linux-armv5-cgo
    21      elif [[ $FILENAME =~ "mihomo-linux-arm-6" ]];then
    22          echo "rename mihomo-linux-arm-6 $FILENAME"
    23          mv $FILENAME mihomo-linux-armv6-cgo
    24      elif [[ $FILENAME =~ "mihomo-linux-arm-7" ]];then
    25          echo "rename mihomo-linux-arm-7 $FILENAME"
    26          mv $FILENAME mihomo-linux-armv7-cgo
    27      elif [[ $FILENAME =~ "linux" ]];then
    28          echo "rename linux $FILENAME"
    29          mv $FILENAME $FILENAME-cgo
    30      elif [[ $FILENAME =~ "android" ]];then
    31          echo "rename android $FILENAME"
    32          mv $FILENAME $FILENAME-cgo
    33      else echo "skip $FILENAME"
    34      fi
    35  done