File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,17 @@ main() {
4040 exit 1
4141 fi
4242
43- supportFilePath=" ${androidXFilePath% .* } -support-$( date " +%Y%m%d%H%M%S" ) .${androidXFilePath##* .} "
43+ supportFilePath=" ${androidXFilePath% .* } -support.${androidXFilePath##* .} "
44+ supportNameSuffix=" -$( date " +%Y%m%d%H%M%S" ) "
45+ if [[ -f " ${supportFilePath} " ]]; then
46+ supportFilePath=" ${supportFilePath% .* }${supportNameSuffix} .${androidXFilePath##* .} "
47+ elif [[ -d " ${supportFilePath} " ]]; then
48+ if [[ " $( find " ${supportFilePath} " -mindepth 1 | head -1) " ]]; then
49+ supportFilePath=" ${supportFilePath% .* }${supportNameSuffix} .${androidXFilePath##* .} "
50+ else
51+ rmdir " ${supportFilePath} "
52+ fi
53+ fi
4454 echo " support 包的保存路径:${supportFilePath} "
4555
4656 outputPrint=" $( " ${resourcesDirPath} $( getFileSeparator) jetifier-standalone-20200827$( getFileSeparator) bin$( getFileSeparator) jetifier-standalone" -r -i " ${androidXFilePath} " -o " ${supportFilePath} " 2>&1 ) "
Original file line number Diff line number Diff line change @@ -40,7 +40,17 @@ main() {
4040 exit 1
4141 fi
4242
43- androidXFilePath=" ${supportFilePath% .* } -androidx-$( date " +%Y%m%d%H%M%S" ) .${supportFilePath##* .} "
43+ androidXFilePath=" ${supportFilePath% .* } -androidx.${supportFilePath##* .} "
44+ androidxNameSuffix=" -$( date " +%Y%m%d%H%M%S" ) "
45+ if [[ -f " ${androidXFilePath} " ]]; then
46+ androidXFilePath=" ${androidXFilePath% .* }${androidxNameSuffix} .${supportFilePath##* .} "
47+ elif [[ -d " ${androidXFilePath} " ]]; then
48+ if [[ " $( find " ${androidXFilePath} " -mindepth 1 | head -1) " ]]; then
49+ androidXFilePath=" ${androidXFilePath% .* }${androidxNameSuffix} .${supportFilePath##* .} "
50+ else
51+ rmdir " ${androidXFilePath} "
52+ fi
53+ fi
4454 echo " androidx 包的保存路径:${androidXFilePath} "
4555
4656 outputPrint=" $( " ${resourcesDirPath} $( getFileSeparator) jetifier-standalone-20200827$( getFileSeparator) bin$( getFileSeparator) jetifier-standalone" -i " ${supportFilePath} " -o " ${androidXFilePath} " 2>&1 ) "
You can’t perform that action at this time.
0 commit comments