summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/setup-optware.sh
blob: d4ae619491a6615a62f02c189620822ee87f3dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if test 0 != `id -u`; then
    echo 'Please run as root'
    exit 1
fi

optware_target=slugos5be
feed=http://ipkg.nslu2-linux.org/feeds/optware/${optware_target}/cross/unstable
latest_xsh=`wget -q -O- ${feed} | grep '\.xsh' | sed -e 's/.*xsh">//' -e 's/<.*//'`

if test -n "${latest_xsh}"; then
    cd /tmp
    rm -f ${latest_xsh}
    wget ${feed}/${latest_xsh}
    sh ${latest_xsh}
fi