--- /dev/null
+Copyright (C) 2017 Ian Kelling
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of the copyright holder nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2017 Ian Kelling
+# See LICENSE file. I prefer apache for small scripts, but
+# this uses fdroidcl license for simplicity
+
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+
+case $1 in
+ -h|--help|*)
+ cat <<'EOF'
+Usage: fdroidcl-up
+Install & update yr fdroid apps
+
+Requires fdroidcl https://github.com/mvdan/fdroidcl
+
+Below is an example list of apps to install/update.
+
+You should replace it with your own list. You can get a list from
+existing manually installed apps by doing fdroidcl search -i, then
+manually removing automatically installed and preinstalled apps.
+
+the fdroidcl author hopes to incorporate similar functionality
+info fdroidcl, at which point this script will go away.
+Watch this issue to be informed of when that happens:
+
+
+EOF
+ exit 0
+ ;;
+esac
+
+fdroid_pkgs=(
+ at.bitfire.davdroid
+ com.nutomic.syncthingandroid
+ org.dmfs.tasks # gui name: OpenTasks
+ org.fdroid.fdroid
+ org.smssecure.smssecure
+)
+
+declare -A installed updated
+fdroidcl update
+for p in $(fdroidcl search -i| grep -o "^\S\+"); do
+ installed[$p]=true
+done
+for p in $(fdroidcl search -u| grep -o "^\S\+"); do
+ updated[$p]=false
+done
+for p in ${fdroid_pkgs[@]}; do
+ ${installed[$p]:-false} || fdroidcl install $p
+done
+for p in ${!installed[@]}; do
+ ${updated[$p]:-true} || fdroidcl upgrade $p
+done