<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi.I not quite understand.I've change the install part as below:</div><div><div><br></div><div>define Package/openwrt-dist-luci/install</div><div>#!/bin/sh</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_DATA) ./files/luci/controller/$(2).lua $(1)/usr/lib/lua/luci/controller/$(2).lua</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_DATA) ./files/luci/model/cbi/$(2).lua $(1)/usr/lib/lua/luci/model/cbi/$(2).lua</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_DIR) $(1)/etc/uci-defaults</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>$(INSTALL_BIN) ./files/root/etc/uci-defaults/luci-$(2) $(1)/etc/uci-defaults/luci-$(2)</div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;"> </span><b style="line-height: 1.7;">if [ -f "./files/luci/i18n/$(2).zh-cn.lmo" ]; then</b></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;"> </span><b style="line-height: 1.7;">$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n</b></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;"> </span><b style="line-height: 1.7;">$(INSTALL_DATA) ./files/luci/i18n/$(2).zh-cn.lmo $(1)/usr/lib/lua/luci/i18n</b></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;"> </span><b style="line-height: 1.7;">fi</b></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>exit 0</div><div>endef</div></div><div><br></div><div>Notice the if then course.</div><div><br></div><div>Here is the error now.</div><div><br></div><div><div>if [ -f "./files/luci/i18n/chinadns.zh-cn.lmo" ]; then install -d -m0755 /home/Openwrt/witi-openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/openwrt-dist-luci/ipkg-all/luci-app-chinadns/usr/lib/lua/luci/i18n install -m0644 ./files/luci/i18n/chinadns.zh-cn.lmo /home/Openwrt/witi-openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/openwrt-dist-luci/ipkg-all/luci-app-chinadns/usr/lib/lua/luci/i18n fi</div><div>bash: -c: line 1: syntax error: unexpected end of file</div><div>make[2]: *** [/home/Openwrt/witi-openwrt/bin/ramips/packages/base/luci-app-chinadns_1.3.8-1_all.ipk] Error 1</div><div>make[2]: Leaving directory `/home/Openwrt/witi-openwrt/package/my_package/openwrt-dist-luci'</div><div>make[1]: *** [package/my_package/openwrt-dist-luci/compile] Error 2</div><div>make[1]: Leaving directory `/homeOpenwrt/witi-openwrt'</div><div>make: *** [package/openwrt-dist-luci/compile] ´íÎó 2</div></div><div><br></div><br><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br>At 2016-01-04 22:28:36, "Luiz Angelo Daros de Luca" <luizluca@gmail.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><p dir="ltr">Andy,</p>
<p dir="ltr">Make runs one line per time. Make the "if" inline or backslash each newline (adding semicolon when needed)</p>
<p dir="ltr">Regards</p>
<br><div class="gmail_quote"><div dir="ltr">Em seg, 4 de jan de 2016 11:56, Andy Wong <<a href="mailto:axisaxisgz@163.com">axisaxisgz@163.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br><div>For no misunderstanding.Here is the error now</div><div><a href="http://pastebin.com/t4Rb08kA" target="_blank">http://pastebin.com/t4Rb08kA</a></div></div><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><br></div><br><br><br><div style="zoom:1"></div><div></div><br><pre><br>ÔÚ 2016-01-04 21:18:14£¬"Andy Wong" <<a href="mailto:axisaxisgz@163.com" target="_blank">axisaxisgz@163.com</a>> дµÀ£º
>Thanks.I have indented like this£º<br/>define Package/openwrt-dist-luci/install<br/>#!/bin/sh<br/> $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller<br/> $(INSTALL_DATA) ./files/luci/controller/$(2).lua $(1)/usr/lib/lua/luci/controller/$(2).lua<br/> $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi<br/> $(INSTALL_DATA) ./files/luci/model/cbi/$(2).lua $(1)/usr/lib/lua/luci/model/cbi/$(2).lua<br/> $(INSTALL_DIR) $(1)/etc/uci-defaults<br/> $(INSTALL_BIN) ./files/root/etc/uci-defaults/luci-$(2) $(1)/etc/uci-defaults/luci-$(2)<br/> if [ -f "./files/luci/i18n/$(2).zh-cn.lmo" ]; then<br/> $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n<br/> $(INSTALL_DATA) ./files/luci/i18n/$(2).zh-cn.lmo $(1)/usr/lib/lua/luci/i18n<br/> fi<br/>endef<br/><br/>But another error appears:<br/>enwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/openwrt-dist-luci/ipkg-all/luci-app-chinadns/etc/uci-defaults/luci-chinadns<br/>if [ -f "./files/luci/i18n/chinadns.zh-cn.lmo" ]; then<br/>bash: -c: line 1: syntax error: unexpected end of file<br/>make[2]: *** [/home/Openwrt/witi-openwrt/bin/ramips/packages/base/luci-app-chinadns_1.3.8-1_all.ipk] Error 1<br/>make[2]: Leaving directory `/home/Openwrt/witi-openwrt/package/my_package/openwrt-dist-luci'<br/>make[1]: *** [package/my_package/openwrt-dist-luci/compile] Error 2<br/>make[1]: Leaving directory `/home/Openwrt/witi-openwrt'<br/>make: *** [package/openwrt-dist-luci/compile] ´íÎó 2<br/><br/>My if,then course is intending to find out if *.zh-cn.lmo exist,then install it.
>At 2016-01-04 20:20:00, "Jo-Philipp Wich" <<a href="mailto:jow@openwrt.org" target="_blank">jow@openwrt.org</a>> wrote:
>>Hi.
>>
>>Lines in the isntall section must be indented with at least one tab
>>since they're shell instructions.
>>
>>~ Jow
>>_______________________________________________
>>openwrt-devel mailing list
>><a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a>
>><a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a>
>_______________________________________________
>openwrt-devel mailing list
><a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a>
><a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a>
</pre></div><br><br><span title="neteasefooter"><p> </p></span>_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div><div dir="ltr">-- <br></div><p dir="ltr">Luiz Angelo Daros de Luca<br>
<a href="mailto:luizluca@gmail.com">luizluca@gmail.com</a></p>
</blockquote></div><br><br><span title="neteasefooter"><p> </p></span>