mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-16 21:25:00 +02:00
Add nlove-run to nlove package
This commit is contained in:
parent
48effcf18b
commit
90251ca0ba
@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=nlove
|
PKG_NAME:=nlove
|
||||||
PKG_REV:=494
|
PKG_REV:=494
|
||||||
PKG_VERSION:=r$(PKG_REV)
|
PKG_VERSION:=r$(PKG_REV)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://bitbucket.org/bartbes/nlove
|
PKG_SOURCE_URL:=https://bitbucket.org/bartbes/nlove
|
||||||
@ -41,6 +41,7 @@ endef
|
|||||||
define Package/nlove/install
|
define Package/nlove/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nlove $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nlove $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) ./files/nlove-run
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,nlove))
|
$(eval $(call BuildPackage,nlove))
|
||||||
|
29
nlove/files/nlove-run
Executable file
29
nlove/files/nlove-run
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: $0 <name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$HOME/.nlove/$1.love" ]; then
|
||||||
|
echo "Game not found, will now attempt to download it."
|
||||||
|
echo "This requires working internet access."
|
||||||
|
mkdir -p /usr/share/nlove > /dev/null
|
||||||
|
echo "Downloading... "
|
||||||
|
wget -q "http://dl.dropbox.com/u/440010/nlove/games/$1.love" -O "/usr/share/nlove/$1.love" > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "An error occured during downloading, are you sure $1 exists?"
|
||||||
|
echo "And do you have internet access?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Done."
|
||||||
|
echo -n "Installing launcher... "
|
||||||
|
mkdir -p /usr/share/gmenu2x/sections/nlove
|
||||||
|
(echo "title=$1" &&
|
||||||
|
echo "exec=/usr/bin/`basename $0`" &&
|
||||||
|
echo "params=$1" &&
|
||||||
|
echo "wrapper=true") > /usr/share/gmenu2x/sections/nlove/$1
|
||||||
|
echo "Done."
|
||||||
|
fi
|
||||||
|
nlove "/usr/share/nlove/$1.love"
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user