From 835b2594550a8f53ec5beee370129e2add162ab0 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 20 Feb 2015 14:07:24 -0800 Subject: minor issues with arg passing --- util/update_theme_repo | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'util/update_theme_repo') diff --git a/util/update_theme_repo b/util/update_theme_repo index 51d2f4175..f7b26ae34 100755 --- a/util/update_theme_repo +++ b/util/update_theme_repo @@ -1,10 +1,15 @@ #!/bin/sh -f -if [ $# -eq '2' ]; then - echo usage: $0 nickname + +if [ $# -ne 1 ]; then + echo usage: $0 repository + echo "Repositories:" + ls extend/theme exit 1 fi cd extend/theme/$1 -git pull +if [ -d .git ] ; then + git pull +fi -- cgit v1.2.3 From 2264ad5c6ef98a63594f100f06f79bfd8668436a Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 23 Feb 2015 19:10:34 -0800 Subject: provide ability to link new themes/addons --- util/update_theme_repo | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'util/update_theme_repo') diff --git a/util/update_theme_repo b/util/update_theme_repo index f7b26ae34..443b26591 100755 --- a/util/update_theme_repo +++ b/util/update_theme_repo @@ -13,3 +13,30 @@ cd extend/theme/$1 if [ -d .git ] ; then git pull fi + +cd ../../.. + +filelist=(`ls extend/theme/$1`) + +cd view/theme + +for a in "${filelist[@]}" ; do + base=`basename $a` + if [ $base = '.git' ]; then +# echo 'ignoring git' + continue; + fi + if [ ! -d ../../extend/theme/$1/$base ]; then +# echo $a 'not a directory' + continue; + fi + if [ -x $base ]; then +# echo $base 'file exists' + continue; + fi + + echo linking $base + ln -s ../../extend/theme/$1/$base $base +done + + -- cgit v1.2.3