3 source "helper-functions.sh"
4 __this_script=`basename $0`
5 __this_script_dir=`dirname $0`
9 __git_clone="$__git clone"
10 __git_pull="$__git pull"
11 __git_clean="$__git clean"
12 __git_repo="git://staff.get-e.org/"
14 # e17 repositories paths
16 __e17_proto="e17/proto"
17 __e17_python_efl="$__e17_proto/python-efl"
21 __lib_modules="edb eet evas ecore embryo edje efreet epeg epsilon emotion etk ewl e_dbus exml enhance"
22 __python_modules="python-evas python-ecore python-edje python-epsilon python-e_dbus"
23 __user_modules="python-etk"
28 __common_build_pkg_options="-rfakeroot -us -uc -D"
29 __build_pkg_options="$__common_build_pkg_options -sa"
30 if [ "x$__arch" = "xarm" ] ; then
31 __build_pkg_options="$__common_build_pkg_options -B"
36 __today=`$__date +%Y%m%d`
39 __distro=`$__head -1 /etc/apt/sources.list|cut -d" " -f3`
41 __base_pkg_dir="$__this_script_dir/packages_$__today"
42 __pkg_dir="$__base_pkg_dir/$__distro/$__arch"
44 __output_file="$__base_pkg_dir/packages_$__today.log"
50 `$__git_clone $repo 2>&1 >> $__output_file`
55 `$__git_pull 2>&1 >> $__output_file`
64 function build_pkg() {
69 function install_pkg() {
74 function uninstall_pkg() {
79 function log_to_file() {
84 if [ ! -r $__output_file ]; then
85 error "Log file $__output_file does not exist"
88 now=`$__date +%H:%M:%S`
89 echo "$now: $msg" >> $__output_file
92 function start_log() {
96 if [ ! -r $__output_file ]; then
100 if [ $? != 0 ] ; then
101 error "Could not create log file $__output_file"
104 echo "*********************************************************" >> $__output_file
105 echo "* Started $__this_script: $now *" >> $__output_file
106 echo "*********************************************************" >> $__output_file
107 echo "" >> $__output_file
108 echo "Configuration:" >> $__output_file
109 echo " Distro.: $__distro" >> $__output_file
110 echo " Arch...: $__arch" >> $__output_file
111 echo "" >> $__output_file
114 function finish_log() {
118 if [ ! -r $__output_file ]; then
119 error "Log file $__output_file does not exist"
122 echo "" >> $__output_file
123 echo "* Finished $__this_script: $now" >> $__output_file
124 echo "" >> $__output_file
128 # Check if we're running inside scratchbox
129 msg_begin "Checking for scratchbox environment"
130 test -r /targets/links/scratchbox.config
136 log_to_file "Created $__pkg_dir"
140 # Download official modules
146 # Download user modules (python-etk)
152 # Uninstall all packages