From 402eea1d31d66e6cf99c8501f47ceb3b1c104021 Mon Sep 17 00:00:00 2001 From: Marcin Orlowski Date: Tue, 1 Dec 2020 00:53:00 +0100 Subject: [PATCH] Updated helper scripts --- bin/install.sh | 11 ++++++++--- bin/pack.sh | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index cec031b..d357a70 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -9,13 +9,18 @@ fi declare -r pkg_name=$(cat src/metadata.desktop | grep X-KDE-PluginInfo-Name | awk '{split($0,a,"="); print a[2]}') declare -r base_name=$(echo "${pkg_name}" | awk '{cnt=split($0,a,"."); print a[cnt]}') -declare -r plasmoid_name="${base_name}.plasmoid" +declare -r pkg_version=$(cat "${src_dir}/metadata.desktop" | grep X-KDE-PluginInfo-Version | awk '{split($0,a,"="); print a[2]}') +declare -r plasmoid_path="../" +declare -r plasmoid_name="${base_name}-${pkg_version}.plasmoid" echo "PKG_NAME: ${pkg_name}" +echo " VERSION: ${pkg_version}" echo "PLASMOID: ${plasmoid_name}" -(cd src && zip -q -r "../${plasmoid_name}" *) -ls -ld *.plasmoid +pushd "${src_dir}" > /dev/null +zip -q -r "${plasmoid_path}/${plasmoid_name}" * +ls -ld "${plasmoid_path}/${plasmoid_name}" +popd > /dev/null declare -r user_home_dir="$(eval echo "~${USER}")" if [[ -d "${user_home_dir}/.local/share/plasma/plasmoids/${pkg_name}" ]]; then diff --git a/bin/pack.sh b/bin/pack.sh index c97094d..d69e304 100755 --- a/bin/pack.sh +++ b/bin/pack.sh @@ -9,11 +9,16 @@ fi declare -r pkg_name=$(cat "${src_dir}/metadata.desktop" | grep X-KDE-PluginInfo-Name | awk '{split($0,a,"="); print a[2]}') declare -r base_name=$(echo "${pkg_name}" | awk '{cnt=split($0,a,"."); print a[cnt]}') -declare -r plasmoid_name="${base_name}.plasmoid" +declare -r pkg_version=$(cat "${src_dir}/metadata.desktop" | grep X-KDE-PluginInfo-Version | awk '{split($0,a,"="); print a[2]}') +declare -r plasmoid_path="../" +declare -r plasmoid_name="${base_name}-${pkg_version}.plasmoid" echo "PKG_NAME: ${pkg_name}" +echo " VERSION: ${pkg_version}" echo "PLASMOID: ${plasmoid_name}" -(cd "${src_dir}" && zip -q -r "../${plasmoid_name}" *) -ls -ld *.plasmoid +pushd "${src_dir}" > /dev/null +zip -q -r "${plasmoid_path}/${plasmoid_name}" * +ls -ld "${plasmoid_path}/${plasmoid_name}" +popd > /dev/null