#!/bin/sh
# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Michael Terry

FILE="$1"
if [ "$#" -ne 1 ] || ! [ -r "$FILE" ]; then
  echo "Usage: $0 FILE" >&2
  exit 1
fi

while read line; do
  echo gsettings set $line
  schema=$(echo "$line" | cut -d' ' -f1)
  key=$(echo "$line" | cut -d' ' -f2)
  value=$(echo "$line" | cut -d' ' -f3-)
  echo gsettings set $line
  gsettings set "$schema" "$key" "$value"
done < "$FILE"
