From c0b17bb04888d9ca8b22868c0c277200753c32fd Mon Sep 17 00:00:00 2001 From: TheElectronWill Date: Fri, 10 Feb 2017 16:16:31 +0100 Subject: [PATCH] Fix empty version number when creating stable RPM --- create-package-stable.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-package-stable.sh b/create-package-stable.sh index 0d38fbf..5e1d64b 100755 --- a/create-package-stable.sh +++ b/create-package-stable.sh @@ -108,7 +108,7 @@ tar -xzf "$archive_name" -C "$downloaded_dir" --strip 1 # Gets the discord's version number + icon file name echo 'Analysing the files...' -version_number="$(echo "$archive_name" | cut -d'-' -f3 | rev | cut -c 8- | rev)" +version_number="$(echo "$archive_name" | cut -d'-' -f2 | rev | cut -c 8- | rev)" # Explaination on how it works: # cut -d'-' -f2 splits the archive's name around the '-' character, and takes the 2nd part # For example if archive_name is "discord-0.0.1.tar.gz" we get "0.0.1.tar.gz"