Created
October 27, 2019 16:28
-
-
Save ysc3839/ac09b0b1328aef3221998ef048015acf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
[ -d "$1" ] || exit 1 | |
cd "$1" | |
DIRS="htdocs /www/ | |
luasrc /usr/lib/lua/luci/ | |
root /" | |
set -- $DIRS | |
while [ $# -gt 1 ]; do | |
[ -d "$1" ] || { shift 2; continue; } | |
cd "$1" | |
find -type d -exec mkdir -p "$2"{} + | |
find -type f -exec ln -s `pwd`/{} "$2"{} + | |
cd - > /dev/null | |
shift 2 | |
done | |
rm -rf /tmp/luci-indexcache | |
rm -rf /tmp/luci-modulecache | |
/etc/init.d/rpcd reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment