Skip to content

Commit bad5676

Browse files
committed
Improvement: Improved the BASH scripts.
1 parent 6f15922 commit bad5676

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

build.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ cp -r gnome-extensions/extension/* "$BUILD_DIR/"
4545

4646
# 3. Compile schemas only for the 'package' build
4747
if [ "$TARGET" == "package" ]; then
48-
echo "Compiling GSettings schema for package build..."
49-
glib-compile-schemas "$BUILD_DIR/schemas/"
50-
if [ $? -ne 0 ]; then
51-
echo "Error: Failed to compile schemas. Aborting." >&2
52-
exit 1
48+
if [ -d "$BUILD_DIR/schemas" ]; then
49+
echo "Compiling GSettings schema for package build..."
50+
glib-compile-schemas "$BUILD_DIR/schemas/"
51+
if [ $? -ne 0 ]; then
52+
echo "Error: Failed to compile schemas. Aborting." >&2
53+
exit 1
54+
fi
55+
else
56+
echo "No schemas/ directory found. Skipping schema compilation."
5357
fi
5458
else
5559
echo "Skipping schema compilation for review build."

install.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ echo "Copying source files..."
2727
cp -r gnome-extensions/extension/* "$INSTALL_DIR/"
2828

2929
# 3. Compile the GSettings schema in the installation directory
30-
echo "Compiling GSettings schema..."
31-
glib-compile-schemas "$INSTALL_DIR/schemas/"
32-
if [ $? -ne 0 ]; then
33-
echo "Warning: Schema compilation failed. Settings may not work correctly."
30+
if [ -d "$INSTALL_DIR/schemas" ]; then
31+
echo "Compiling GSettings schema..."
32+
glib-compile-schemas "$INSTALL_DIR/schemas/"
33+
if [ $? -ne 0 ]; then
34+
echo "Warning: Schema compilation failed. Settings may not work correctly."
35+
fi
36+
else
37+
echo "No schemas/ directory found. Skipping schema compilation."
3438
fi
3539

3640
# 4. Final success message

0 commit comments

Comments
 (0)