-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from Sourcastic/dev
Feat: Port splashcreen to KDE6, Remove lightly in favour of default breeze
- Loading branch information
Showing
7 changed files
with
57 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
#!/bin/sh -eu | ||
#!/bin/sh | ||
|
||
# From github.com/skinatro/theme-tool | ||
|
||
help() { | ||
cat <<EOF | ||
cat <<EOF | ||
Usage: ${0##*/} -o <output> -s <source> | ||
Usage: ${0##*/} -o <output> -s <source> -f <flavour> | ||
-o <path> Output directory | ||
-s <path> Source file | ||
-f <flavour> Flavour name (Mocha, Macchiato, Frappe, Latte) | ||
EOF | ||
exit 1 # Exit script after printing help | ||
exit 1 # Exit script after printing help | ||
} | ||
|
||
while getopts o:s: opt; do | ||
case "$opt" in | ||
o) OUT="$OPTARG" ;; | ||
s) SOURCE="$OPTARG" ;; | ||
?) help ;; # Print help in case parameter is non-existent | ||
esac | ||
while getopts o:s:f: opt; do | ||
case "$opt" in | ||
o) OUT="$OPTARG" ;; | ||
s) SOURCE="$OPTARG" ;; | ||
f) FLAVOURNAME="$OPTARG" ;; # New case for -f | ||
?) help ;; | ||
esac | ||
done | ||
|
||
# Print help in case parameters are empty | ||
if [ -z "$OUT" ] || [ -z "$SOURCE" ]; then | ||
echo "Some or all of the parameters are empty" | ||
help | ||
if [ -z "$OUT" ] || [ -z "$SOURCE" ] || [ -z "$FLAVOURNAME" ]; then | ||
echo "Some or all of the parameters are empty" | ||
help | ||
fi | ||
|
||
# no arrays due to posix compliancy | ||
if echo "$FLAVOURNAME" | grep -Evq 'Mocha|Macchiato|Frappe|Latte'; then | ||
clear | ||
echo "Invalid palette $FLAVOURNAME" | ||
exit | ||
clear | ||
echo "Invalid palette $FLAVOURNAME" | ||
exit | ||
fi | ||
sed -f Installer/Pallets/"$FLAVOURNAME".sed "$SOURCE" > "$OUT" | ||
|
||
FLAVOUR_SED="Installer/Pallets/${FLAVOURNAME}.sed" | ||
sed -f "$FLAVOUR_SED" "$SOURCE" > "$OUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters