#!/bin/sh

if [ -f "$0.in" ]
then
  scriptDir="`dirname $0`"
  uiDir="$scriptDir/../data"
  jsDir="$scriptDir/../js"
  schemaDir="$scriptDir/../data"
else
  uiDir="/usr/share/gnome-shell"
  jsDir="/usr/share/gnome-shell/js"
  schemaDir="/usr/share/glib-2.0/schemas"
fi

progName="`basename $0`"
localeDir="/usr/share/locale"
uiFile="$uiDir/clock-preferences.ui"
export GJS_PATH="$jsDir"
export GSETTINGS_SCHEMA_DIR="$schemaDir"

/usr/bin/gjs-console -c "const ClockPreferences = imports.prefs.clockPreferences;
ClockPreferences.main({ progName: '$progName',
                        uiFile: '$uiFile',
                        localeDir: '$localeDir' });"
