aboutsummaryrefslogtreecommitdiffstats
path: root/util/add_widget_repo
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-12 21:57:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-12 21:57:06 -0700
commit4ca06ebd79b5258c5cb6ccb0871d98c9180f91b2 (patch)
tree6d2606957bca2ff36c1f564c611aea4272cf5a88 /util/add_widget_repo
parent018e7022817fd73e904021ecf46f2c5839da9a62 (diff)
parent19a2bdeb915ff32a0612717994b93e07a670fd2f (diff)
downloadvolse-hubzilla-4ca06ebd79b5258c5cb6ccb0871d98c9180f91b2.tar.gz
volse-hubzilla-4ca06ebd79b5258c5cb6ccb0871d98c9180f91b2.tar.bz2
volse-hubzilla-4ca06ebd79b5258c5cb6ccb0871d98c9180f91b2.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'util/add_widget_repo')
-rwxr-xr-xutil/add_widget_repo35
1 files changed, 35 insertions, 0 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
+
+