Date:2011-02-13 17:29:02 (13 years 1 month ago)
Author:bartbes
Commit:90251ca0ba16f6acb45f960e2c26e0d07c431170
Message:Add nlove-run to nlove package

Files: nlove/Makefile (2 diffs)
nlove/files/nlove-run (1 diff)

Change Details

nlove/Makefile
33PKG_NAME:=nlove
44PKG_REV:=494
55PKG_VERSION:=r$(PKG_REV)
6PKG_RELEASE:=1
6PKG_RELEASE:=2
77
88PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
99PKG_SOURCE_URL:=https://bitbucket.org/bartbes/nlove
...... 
4141define Package/nlove/install
4242    $(INSTALL_DIR) $(1)/usr/bin
4343    $(INSTALL_BIN) $(PKG_BUILD_DIR)/nlove $(1)/usr/bin/
44    $(INSTALL_BIN) ./files/nlove-run
4445endef
4546
4647$(eval $(call BuildPackage,nlove))
nlove/files/nlove-run
1#!/bin/sh
2
3if [ $# -lt 1 ]; then
4    echo "Usage: $0 <name>"
5    exit 1
6fi
7
8if [ ! -f "$HOME/.nlove/$1.love" ]; then
9    echo "Game not found, will now attempt to download it."
10    echo "This requires working internet access."
11    mkdir -p /usr/share/nlove > /dev/null
12    echo "Downloading... "
13    wget -q "http://dl.dropbox.com/u/440010/nlove/games/$1.love" -O "/usr/share/nlove/$1.love" > /dev/null
14    if [ $? -ne 0 ]; then
15        echo "An error occured during downloading, are you sure $1 exists?"
16        echo "And do you have internet access?"
17        exit 1
18    fi
19    echo "Done."
20    echo -n "Installing launcher... "
21    mkdir -p /usr/share/gmenu2x/sections/nlove
22    (echo "title=$1" &&
23    echo "exec=/usr/bin/`basename $0`" &&
24    echo "params=$1" &&
25    echo "wrapper=true") > /usr/share/gmenu2x/sections/nlove/$1
26    echo "Done."
27fi
28nlove "/usr/share/nlove/$1.love"
29exit 0

Archive Download the corresponding diff file



interactive