Skip to content

Commit

Permalink
Updated helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinOrlowski committed Nov 30, 2020
1 parent b66dfac commit 402eea1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions bin/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 402eea1

Please sign in to comment.