psyced/config/openwrt/installation.sh

46 lines
1.6 KiB
Bash
Raw Normal View History

2012-02-09 10:12:12 +00:00
#!/bin/sh
echo _______________________________________________________________
echo This installs psyced on an openwrt by deleting large parts of
echo psyced that are not necessary. 3 seconds pause before we do it.
echo _______________________________________________________________
sleep 3
work_dir='openwrt-psyced'
#deleting all previous attempt to build openwrt's ipkg psyced tree
rm $work_dir -rf
# preparing ipkg root dir
mkdir $work_dir
mkdir $work_dir/opt
mkdir $work_dir/opt/psyced
mkdir $work_dir/opt/psyced/local
mkdir $work_dir/etc
mkdir $work_dir/etc/init.d
cd $work_dir/opt/psyced && tar -xf ../../../data.tar
echo _______________________________________________________________
echo Should you like to update psyced before we delete the git repo,
echo suspend now and issue 'git pull'. The current version from git
echo may be better or worse than what you have in the snapshot.
echo _______________________________________________________________
sleep 3
cp config/init.d/psyced-openwrt ../../etc/init.d/psyced
cp config/psyced.ini ../../etc/psyced.ini
# in order to respect base policies of psyced file/dir structure this section may change
mv config/blueprint/* local
#FIXME: need to execute psyconf or add files generated by psyconf
#FIXME
# what is this? can't execute in toolchain, maybe we have to put it in /etc/init.d/psyced?
#ln -s /opt/psyced/local /etc/psyc
# removing large part of psyced
rm -rf .git* CHANGESTODO install.sh bin/psyked bin/csv* config pike
rm -rf run/* utility world/drivers/amylaar world/drivers/mudos log
# directory is generated elsewhere
ln -s /var/log/psyced log