Remove unnecessary copy_dummy_files_rec function

Create the folder and copy the file manually instead of using a separate function for this, as the function is only used once.
This commit is contained in:
Robert Müller 2024-05-17 20:00:54 +02:00
parent d9f810691b
commit c8f0391c62

View file

@ -172,6 +172,7 @@ printf "\e[36mPreparing gradle build\n"
cd "${_DEFAULT_BUILD_FOLDER}" || exit 1
mkdir -p src/main
mkdir -p src/main/res/values
mkdir -p src/main/res/mipmap
function copy_dummy_files() {
@ -179,11 +180,6 @@ function copy_dummy_files() {
cp ../"$1" "$2"
}
function copy_dummy_files_rec() {
rm -R ./"$2"/"$1"
cp -R ../"$1" "$2"
}
copy_dummy_files scripts/android/files/build.sh build.sh
copy_dummy_files scripts/android/files/gradle-wrapper.jar gradle-wrapper.jar
copy_dummy_files scripts/android/files/build.gradle build.gradle
@ -192,7 +188,7 @@ copy_dummy_files scripts/android/files/gradle.properties gradle.properties
copy_dummy_files scripts/android/files/proguard-rules.pro proguard-rules.pro
copy_dummy_files scripts/android/files/settings.gradle settings.gradle
copy_dummy_files scripts/android/files/AndroidManifest.xml src/main/AndroidManifest.xml
copy_dummy_files_rec scripts/android/files/res src/main
copy_dummy_files scripts/android/files/res/values/strings.xml src/main/res/values/strings.xml
copy_dummy_files other/icons/DDNet_256x256x32.png src/main/res/mipmap/ic_launcher.png
copy_dummy_files other/icons/DDNet_256x256x32.png src/main/res/mipmap/ic_launcher_round.png