diff options
author | zotlabs <mike@macgirvin.com> | 2018-07-15 21:34:06 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-07-15 21:34:06 -0700 |
commit | c187461985fe5e6fa512ded78193d121c5ff6db0 (patch) | |
tree | 05fead87047eb9cee2715d8c022be60a79f7df7d /util/update_addon_repo | |
parent | cc91db55b7ca24cb0b97273bab948af91dac0511 (diff) | |
download | volse-hubzilla-c187461985fe5e6fa512ded78193d121c5ff6db0.tar.gz volse-hubzilla-c187461985fe5e6fa512ded78193d121c5ff6db0.tar.bz2 volse-hubzilla-c187461985fe5e6fa512ded78193d121c5ff6db0.zip |
update_addon_repo: scan the addon dir after updating and remove dead symlinks (which represent deprecated/removed addons).
Diffstat (limited to 'util/update_addon_repo')
-rwxr-xr-x | util/update_addon_repo | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/update_addon_repo b/util/update_addon_repo index 0e471eb4f..02c860c8c 100755 --- a/util/update_addon_repo +++ b/util/update_addon_repo @@ -44,3 +44,10 @@ for a in "${filelist[@]}" ; do echo linking $base ln -s ../extend/addon/$1/$base $base done + +for x in `ls` ; do + if [ -L "$x" ] && ! [ -e "$x" ]; then + echo "removing dead symlink $x" ; + rm -- "$x"; + fi; +done |