Skip to content

Commit 0566a92

Browse files
committed
improve bin/ script usability (#22)
* Remove `load-script.sh`. This is for dev-only, and is not really useful at this stage. Also, it's very difficult to use it right... * Make `install.sh` and `pack.sh` more user-friendly. * Move scripts to the repository root. There are only two scripts. * Hard-code file list into `pack.sh` to prevent including random files into the package itself.
1 parent 11736da commit 0566a92

File tree

4 files changed

+23
-70
lines changed

4 files changed

+23
-70
lines changed

bin/load-script.sh

Lines changed: 0 additions & 66 deletions
This file was deleted.

bin/pack.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

bin/install.sh renamed to install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/bin/sh
2+
set -euf
3+
4+
if [[ ! -f forceblur.kwinscript ]]; then
5+
echo "Error: can't find package file: $PWD/forceblur.kwinscript"
6+
echo "Please run 'pack' first"
7+
exit 1
8+
fi >&2
29

310
plasmapkg2 -i forceblur.kwinscript || plasmapkg2 -u forceblur.kwinscript
411
mkdir -pv ~/.local/share/kservices5/

pack.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if ! type zip >&/dev/null; then
5+
echo "Error: Can't find 'zip' command."
6+
echo " Please install 'zip' command first."
7+
exit 1
8+
fi >&2
9+
10+
file=forceblur.kwinscript
11+
rm -rvf "$file"
12+
exec zip -r9 "$file" \
13+
README.md \
14+
LICENSE \
15+
metadata.desktop \
16+
contents \

0 commit comments

Comments
 (0)