aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutil/add_widget_repo35
-rwxr-xr-xutil/update_addon_repo4
-rwxr-xr-xutil/update_widget_repo35
3 files changed, 72 insertions, 2 deletions
diff --git a/util/add_widget_repo b/util/add_widget_repo
new file mode 100755
index 000000000..449afe5db
--- /dev/null
+++ b/util/add_widget_repo
@@ -0,0 +1,35 @@
+#!/bin/sh -f
+
+if [ $# -ne 2 ]; then
+ echo usage: $0 repo_url nickname
+ exit 1
+fi
+
+mkdir -p extend/widget/$2
+mkdir widget > /dev/null 2>&1
+git clone $1 extend/widget/$2
+if [ $? -ne 0 ]; then
+ exit $?
+fi
+
+filelist=(`ls extend/widget/$2`)
+
+
+cd widget
+for a in "${filelist[@]}" ; do
+ base=`basename $a`
+ if [ $base = '.git' ]; then
+# echo 'ignoring git'
+ continue;
+ fi
+ if [ -x $base ]; then
+# echo $base 'file exists'
+ continue;
+ fi
+
+ echo linking $base
+
+ ln -s ../extend/widget/$2/$base $base
+done
+
+
diff --git a/util/update_addon_repo b/util/update_addon_repo
index c6c2c4a47..42bd3a71f 100755
--- a/util/update_addon_repo
+++ b/util/update_addon_repo
@@ -25,7 +25,7 @@ for a in "${filelist[@]}" ; do
# echo 'ignoring git'
continue;
fi
- if [ ! -d ../extend/theme/$1/$base ]; then
+ if [ ! -d ../extend/addon/$1/$base ]; then
# echo $a 'not a directory'
continue;
fi
@@ -35,5 +35,5 @@ for a in "${filelist[@]}" ; do
fi
echo linking $base
- ln -s ../extend/theme/$1/$base $base
+ ln -s ../extend/addon/$1/$base $base
done
diff --git a/util/update_widget_repo b/util/update_widget_repo
new file mode 100755
index 000000000..c00c85708
--- /dev/null
+++ b/util/update_widget_repo
@@ -0,0 +1,35 @@
+#!/bin/sh -f
+
+if [ $# -ne 1 ]; then
+ echo usage: $0 repository
+ echo "Repositories:"
+ ls extend/widget
+ exit 1
+fi
+
+cd extend/widget/$1
+
+if [ -d .git ] ; then
+ git pull
+fi
+
+cd ../../..
+
+filelist=(`ls extend/widget/$1`)
+
+cd widget
+
+for a in "${filelist[@]}" ; do
+ base=`basename $a`
+ if [ $base = '.git' ]; then
+# echo 'ignoring git'
+ continue;
+ fi
+ if [ -x $base ]; then
+# echo $base 'file exists'
+ continue;
+ fi
+
+ echo linking $base
+ ln -s ../extend/widget/$1/$base $base
+done