[Android] Add the file path to the publish to maven script

Nicolas Pomepuy git at videolan.org
Mon May 3 09:13:11 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May  3 09:32:48 2021 +0200| [71481c5c2796a08e84d3715a0655c3b9e7df713a] | committer: Nicolas Pomepuy

Add the file path to the publish to maven script

> https://code.videolan.org/videolan/vlc-android/commit/71481c5c2796a08e84d3715a0655c3b9e7df713a
---

 buildsystem/maven/README.md                 |  2 +-
 buildsystem/maven/deploy-to-mavencentral.sh | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/buildsystem/maven/README.md b/buildsystem/maven/README.md
index 09ee80f2e..010b3a389 100644
--- a/buildsystem/maven/README.md
+++ b/buildsystem/maven/README.md
@@ -26,7 +26,7 @@ Copy the file to this directory (`buildsystem/maven`)
 
 You just have to plug your yubikey and run the script
 
-`./deploy-to-mavencentral.sh`
+`./deploy-to-mavencentral.sh [FILE_PATH]`
 
 The script will do the following actions:
 
diff --git a/buildsystem/maven/deploy-to-mavencentral.sh b/buildsystem/maven/deploy-to-mavencentral.sh
index cbd4e71e1..3e12c6b15 100755
--- a/buildsystem/maven/deploy-to-mavencentral.sh
+++ b/buildsystem/maven/deploy-to-mavencentral.sh
@@ -28,6 +28,14 @@ function red() {
   echo -e "\033[1;31m===================\n$1\n===================\033[0m"
 }
 
+if [ $# -eq 0 ]
+  then
+    red "The file path has not been specified."
+    exit 1
+fi
+
+FILE=$1
+
 #START
 
 rm -rf $OUTPUT_DIR
@@ -35,11 +43,11 @@ mkdir -p $OUTPUT_DIR
 
 blue "File management"
 #check files
-if test -f "dbg.zip"; then
+if test -f "$FILE"; then
   blue "File exists. Unzipping"
-  unzip "dbg.zip" -d $OUTPUT_DIR
+  unzip "$FILE" -d $OUTPUT_DIR
 else
-  red "Cannot find the dbg.zip file."
+  red "Cannot find the $FILE file."
   exit 1
 fi
 



More information about the Android mailing list