]>
git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/blob - tools/make-functions
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2010 IPFire Team <info@ipfire.org> #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
21 ###############################################################################
23 # Beautifying variables & presentation & input output interface
25 ###############################################################################
28 # Find current screen size
29 if [ -z "${COLUMNS}" ]; then
31 COLUMNS
=${COLUMNS##* }
34 # When using remote connections, such as a serial port, stty size returns 0
35 if [ "${COLUMNS}" = "0" ]; then
39 ## Measurements for positioning result messages
44 RESULT_COL
=$
((${COLUMNS} - $RESULT_WIDTH - 4))
45 TIME_COL
=$
((${RESULT_COL} - $TIME_WIDTH - 5))
46 OPT_COL
=$
((${TIME_COL} - $OPT_WIDTH - 5))
47 VER_COL
=$
((${OPT_COL} - $VER_WIDTH - 5))
49 ## Set Cursur Position Commands, used via echo -e
50 SET_RESULT_COL
="\\033[${RESULT_COL}G"
51 SET_TIME_COL
="\\033[${TIME_COL}G"
52 SET_OPT_COL
="\\033[${OPT_COL}G"
53 SET_VER_COL
="\\033[${VER_COL}G"
55 # Define color for messages
64 if [ "$?" -eq "0" ]; then
71 if [ $EXITCODE -ne "0" ]; then
79 # ARG1=starting position on screen
80 # ARG2=string to be printed
81 # ARG3=offset, negative for left movement, positive for right movement, relative to ARG1
82 # For example if your starting position is column 50 and you want to print Hello three columns to the right
83 # of your starting position, your call will look like this:
84 # position_cursor 50 "Hello" 3 (you'll get the string Hello at position 53 (= 50 + 3)
85 # If on the other hand you want your string "Hello" to end three columns to the left of position 50,
86 # your call will look like this:
87 # position_cursor 50 "Hello" -3 (you'll get the string Hello at position 42 (= 50 - 5 -3)
88 # If you want to start printing at the exact starting location, use offset 0
94 STRING_LENGTH
=${#STRING}
96 if [ ${OFFSET} -lt 0 ]; then
97 COL
=$
((${START} + ${OFFSET} - ${STRING_LENGTH}))
99 COL
=$
((${START} + ${OFFSET}))
102 SET_COL
="\\033[${COL}G"
105 } # End of position_cursor()
110 # Commands: build_stage, make_pkg, message, result
115 echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
118 echo -ne "${WARN}${3}${NORMAL}${SET_RESULT_COL}[${WARN} WARN ${NORMAL}]\n"
121 echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
124 echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
130 if [ "$STAGE_TIME_START" ]; then
131 LAST_STAGE_TIME
=$
[ `date +%s` - $STAGE_TIME_START ]
133 STAGE_TIME_START
=`date +%s`
134 echo -ne "${BOLD}*** ${MESSAGE}${NORMAL}"
135 if [ "$LAST_STAGE_TIME" ]; then
136 echo -ne "${DONE} (Last stage took $LAST_STAGE_TIME secs)${NORMAL}"
138 echo -ne "${BOLD}${SET_VER_COL} version${SET_OPT_COL} options${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n"
141 BUILD_TIME_START
=`date +%s`
144 BUILD_TIME_END
=`date +%s`
145 seconds
=$
[ $BUILD_TIME_END - $BUILD_TIME_START ]
146 hours
=$
((seconds
/ 3600))
147 seconds
=$
((seconds
% 3600))
148 minutes
=$
((seconds
/ 60))
149 seconds
=$
((seconds
% 60))
151 echo -ne "${DONE}***Build is finished now and took $hours hour(s) $minutes minute(s) $seconds second(s)!${NORMAL}\n"
154 echo "$2" |
while read PKG_VER PROGRAM OPTIONS
156 SET_VER_COL_REAL
=`position_cursor $OPT_COL $PKG_VER -3`
158 if [ "$OPTIONS" == "" ]; then
159 echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
160 echo -ne "${NORMAL} ]${SET_RESULT_COL}"
162 echo -ne "${PROGRAM}${SET_VER_COL}[ ${BOLD}${SET_VER_COL_REAL}${PKG_VER}"
163 echo -ne "${NORMAL} ]${SET_OPT_COL}[ ${BOLD}${OPTIONS}"
164 echo -ne "${NORMAL} ]${SET_RESULT_COL}"
177 SET_TIME_COL_REAL
=`position_cursor $RESULT_COL $PKG_TIME -3`
180 echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
181 echo -ne "${SET_RESULT_COL}[${DONE} DONE ${NORMAL}]\n"
184 echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
185 echo -ne "${SET_RESULT_COL}[${FAIL} FAIL ${NORMAL}]\n"
188 echo -ne "${SET_TIME_COL}[ ${BOLD}${SET_TIME_COL_REAL}$PKG_TIME${NORMAL} ]"
189 echo -ne "${SET_RESULT_COL}[${SKIP} SKIP ${NORMAL}]\n"
194 } # End of beautify()
199 PKG_VER
=`grep ^VER $1 | awk '{print $3}'`
201 if [ -z $PKG_VER ]; then
202 PKG_VER
=`grep "Exp " $1 | awk '{print $4}'`
205 if [ ${#PKG_VER} -gt $VER_WIDTH ]; then
206 # If a package version number is greater than $VER_WIDTH, we keep the first 4 characters
207 # and replace enough characters to fit the resulting string on the screen. We'll replace
208 # the extra character with .. (two dots). That's why the "+ 2" in the formula below.
209 # Example: if we have a 21-long version number that we want to fit into a 10-long space,
210 # we have to remove 11 characters. But if we replace 11 characters with 2 characters, we'll
211 # end up with a 12-character long string. That's why we replace 12 characters with ..
212 REMOVE
=`expr substr "$PKG_VER" 4 $[ ${#PKG_VER} - $VER_WIDTH + 2 ]`
213 PKG_VER
=`echo ${PKG_VER/$REMOVE/..}`
217 } # End of get_pkg_ver()
219 if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
220 echo "`date -u '+%b %e %T'`: Machine is iX86 (or equivalent)" >> $LOGFILE
222 BUILDTARGET
=i586-pc-linux-gnu
223 CFLAGS
="-O2 -march=i586 -pipe -fomit-frame-pointer"
224 CXXFLAGS
="-O2 -march=i586 -pipe -fomit-frame-pointer"
225 C2FLAGS
="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
226 CXX2FLAGS
="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
228 echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
234 umount
$BASEDIR/build
/sys
2>/dev
/null
;
235 umount
$BASEDIR/build
/dev
/shm
2>/dev
/null
;
236 umount
$BASEDIR/build
/dev
/pts
2>/dev
/null
;
237 umount
$BASEDIR/build
/dev
2>/dev
/null
;
238 umount
$BASEDIR/build
/proc
2>/dev
/null
;
239 umount
$BASEDIR/build
/install
/mnt
2>/dev
/null
;
240 umount
$BASEDIR/build
/usr
/src
/cache
2>/dev
/null
;
241 umount
$BASEDIR/build
/usr
/src
/ccache
2>/dev
/null
;
242 umount
$BASEDIR/build
/usr
/src
/config
2>/dev
/null
;
243 umount
$BASEDIR/build
/usr
/src
/doc
2>/dev
/null
;
244 umount
$BASEDIR/build
/usr
/src
/html
2>/dev
/null
;
245 umount
$BASEDIR/build
/usr
/src
/langs
2>/dev
/null
;
246 umount
$BASEDIR/build
/usr
/src
/lfs
2>/dev
/null
;
247 umount
$BASEDIR/build
/usr
/src
/log
2>/dev
/null
;
248 umount
$BASEDIR/build
/usr
/src
/src
2>/dev
/null
;
253 for i
in `seq 0 7`; do
254 if ( losetup
/dev
/loop
${i} 2>/dev
/null |
grep -q "/install/images" ); then
255 losetup
-d /dev
/loop
${i} 2>/dev
/null
258 echo -e "\nERROR: $*"
259 echo " Check $LOGFILE for errors if applicable"
264 if [ ! -e $BASEDIR/build
/usr
/src
/lfs
/ ]; then
265 exiterror
"No such file or directory: $BASEDIR/build/usr/src/lfs/"
267 echo "Entering to a shell inside LFS chroot, go out with exit"
268 $linux32 chroot
$LFS /tools
/bin
/env
-i HOME
=/root TERM
=$TERM PS1
='\u:\w\$ ' \
269 PATH
=/usr
/local
/bin
:/bin
:/usr
/bin
:/sbin
:/usr
/sbin
:/tools
/bin \
270 VERSION
=$VERSION CONFIG_ROOT
=$CONFIG_ROOT \
271 NAME
="$NAME" SNAME
="$SNAME" SLOGAN
="$SLOGAN" \
272 CFLAGS
="$CF2LAGS" CXXFLAGS
="$CXX2FLAGS" \
273 CCACHE_DIR
=/usr
/src
/ccache \
277 BUILDTARGET
="$BUILDTARGET" MACHINE
="$MACHINE" \
278 KGCC
="ccache /usr/bin/gcc" \
280 if [ $?
-ne 0 ]; then
281 beautify message FAIL
282 exiterror
"chroot error"
288 ############################################################################
290 # Necessary shell functions #
292 ############################################################################
294 # Common checking before entering the chroot and compilling
296 # Return:0 caller can continue
297 # :1 skip (nothing to do)
298 # or fail if no script file found
303 if [ ! -f $BASEDIR/lfs
/$1 ]; then
304 exiterror
"No such file or directory: $BASEDIR/$1"
307 local PKG_VER
=`get_pkg_ver $BASEDIR/lfs/$1`
308 beautify make_pkg
"$PKG_VER $*"
312 for i
in $SKIP_PACKAGE_LIST
314 if [ "$i" == "$1" ]; then
320 echo -ne "`date -u '+%b %e %T'`: Building $* " >> $LOGFILE
322 cd $BASEDIR/lfs
&& make -s -f $
* LFS_BASEDIR
=$BASEDIR MESSAGE
="$1\t " download
>> $LOGFILE 2>&1
323 if [ $?
-ne 0 ]; then
324 exiterror
"Download error in $1"
327 cd $BASEDIR/lfs
&& make -s -f $
* LFS_BASEDIR
=$BASEDIR MESSAGE
="$1\t md5sum" md5
>> $LOGFILE 2>&1
328 if [ $?
-ne 0 ]; then
329 exiterror
"md5sum error in $1, check file in cache or signature"
333 } # End of lfsmakecommoncheck()
336 lfsmakecommoncheck $
*
337 [ $?
== 1 ] && return 0
339 local PKG_TIME_START
=`date +%s`
341 cd $BASEDIR/lfs
&& make -f $
* BUILDTARGET
=$BUILDTARGET \
343 LFS_BASEDIR
=$BASEDIR \
346 MAKETUNING
=$MAKETUNING \
347 install >> $LOGFILE 2>&1
348 local COMPILE_SUCCESS
=$?
349 local PKG_TIME_END
=`date +%s`
351 if [ $COMPILE_SUCCESS -ne 0 ]; then
352 beautify result FAIL $
[ $PKG_TIME_END - $PKG_TIME_START ]
353 exiterror
"Building $*";
355 beautify result DONE $
[ $PKG_TIME_END - $PKG_TIME_START ]
362 lfsmakecommoncheck $
*
363 [ $?
== 1 ] && return 0
365 local PKG_TIME_START
=`date +%s`
366 $linux32 chroot
$LFS /tools
/bin
/env
-i HOME
=/root \
367 TERM
=$TERM PS1
='\u:\w\$ ' \
368 PATH
=/usr
/local
/bin
:/bin
:/usr
/bin
:/sbin
:/usr
/sbin
:/tools
/bin \
370 CONFIG_ROOT
=$CONFIG_ROOT \
371 NAME
="$NAME" SNAME
="$SNAME" SLOGAN
="$SLOGAN" \
372 CFLAGS
="$C2FLAGS" CXXFLAGS
="$CXX2FLAGS" \
373 CCACHE_DIR
=/usr
/src
/ccache CCACHE_COMPRESS
=1 CCACHE_HASHDIR
=1 \
374 KVER
=$KVER MAKETUNING
=$MAKETUNING \
375 BUILDTARGET
="$BUILDTARGET" MACHINE
="$MACHINE" \
377 /tools
/bin
/bash
-x -c "cd /usr/src/lfs && \
378 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
379 local COMPILE_SUCCESS
=$?
380 local PKG_TIME_END
=`date +%s`
382 if [ $COMPILE_SUCCESS -ne 0 ]; then
383 beautify result FAIL $
[ $PKG_TIME_END - $PKG_TIME_START ]
384 exiterror
"Building $*";
386 beautify result DONE $
[ $PKG_TIME_END - $PKG_TIME_START ]
393 lfsmakecommoncheck $
*
394 [ $?
== 1 ] && return 0
396 local PKG_TIME_START
=`date +%s`
397 $linux32 chroot
$LFS /tools
/bin
/env
-i HOME
=/root \
398 TERM
=$TERM PS1
='\u:\w\$ ' \
399 PATH
=/usr
/local
/bin
:/bin
:/usr
/bin
:/sbin
:/usr
/sbin \
402 CONFIG_ROOT
=$CONFIG_ROOT \
403 NAME
="$NAME" SNAME
="$SNAME" SLOGAN
="$SLOGAN" \
404 CFLAGS
="$C2FLAGS" CXXFLAGS
="$CXX2FLAGS" \
405 CCACHE_DIR
=/usr
/src
/ccache CCACHE_COMPRESS
=1 CCACHE_HASHDIR
=1 \
406 KVER
=$KVER MAKETUNING
=$MAKETUNING \
407 BUILDTARGET
="$BUILDTARGET" MACHINE
="$MACHINE" \
409 /bin
/bash
-x -c "cd /usr/src/lfs && \
410 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
412 local COMPILE_SUCCESS
=$?
413 local PKG_TIME_END
=`date +%s`
415 if [ $COMPILE_SUCCESS -ne 0 ]; then
416 beautify result FAIL $
[ $PKG_TIME_END - $PKG_TIME_START ]
417 exiterror
"Building $*";
419 beautify result DONE $
[ $PKG_TIME_END - $PKG_TIME_START ]
425 lfsmakecommoncheck $
*
426 [ $?
== 1 ] && return 0
428 local PKG_TIME_START
=`date +%s`
429 chroot
$LFS /tools
/bin
/env
-i HOME
=/root \
430 TERM
=$TERM PS1
='\u:\w\$ ' \
431 PATH
=/usr
/local
/bin
:/bin
:/usr
/bin
:/sbin
:/usr
/sbin \
433 CONFIG_ROOT
=$CONFIG_ROOT \
434 NAME
="$NAME" SNAME
="$SNAME" SLOGAN
="$SLOGAN" \
435 CFLAGS
="$C2FLAGS" CXXFLAGS
="$CXX2FLAGS" \
436 CCACHE_DIR
=/usr
/src
/ccache CCACHE_COMPRESS
=1 CCACHE_HASHDIR
=1 \
437 KVER
=$KVER IPFVER
="$IPFVER" \
438 BUILDTARGET
="$BUILDTARGET" MACHINE
="$MACHINE" \
439 /bin
/bash
-x -c "cd /usr/src/lfs && \
440 make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
442 local COMPILE_SUCCESS
=$?
443 local PKG_TIME_END
=`date +%s`
445 if [ $COMPILE_SUCCESS -ne 0 ]; then
446 beautify result FAIL $
[ $PKG_TIME_END - $PKG_TIME_START ]
447 exiterror
"Packaging $*";
449 beautify result DONE $
[ $PKG_TIME_END - $PKG_TIME_START ]
455 lfsmakecommoncheck $
*
456 [ $?
== 1 ] && return 0
458 local PKG_TIME_START
=`date +%s`
459 $linux32 chroot
$LFS /tools
/bin
/env
-i HOME
=/root \
460 TERM
=$TERM PS1
='\u:\w\$ ' \
461 PATH
=/opt
/i586-uClibc
/i586-linux-uclibc
/bin
:/opt
/i586-uClibc
/bin
:/usr
/local
/bin
:/bin
:/usr
/bin
:/sbin
:/usr
/sbin \
463 CONFIG_ROOT
=$CONFIG_ROOT \
465 NAME
="$NAME" SNAME
="$SNAME" SLOGAN
="$SLOGAN" \
466 CFLAGS
="-Os" CXXFLAGS
="-Os" \
467 CCACHE_DIR
=/usr
/src
/ccache CCACHE_COMPRESS
=1 CCACHE_HASHDIR
=1 \
468 KVER
=$KVER IPFVER
="$IPFVER" \
469 BUILDTARGET
="$BUILDTARGET" MACHINE
="$MACHINE" \
470 /bin
/bash
-x -c "cd /usr/src/lfs && \
471 make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
473 local COMPILE_SUCCESS
=$?
474 local PKG_TIME_END
=`date +%s`
476 if [ $COMPILE_SUCCESS -ne 0 ]; then
477 beautify result FAIL $
[ $PKG_TIME_END - $PKG_TIME_START ]
478 exiterror
"Building $*";
480 beautify result DONE $
[ $PKG_TIME_END - $PKG_TIME_START ]
486 tar cfz log
/ipfire-logs-
`date +'%Y-%m-%d-%H:%M'`.tgz log
/_build.
*
491 echo -ne "${BOLD}***This is our auto buildscript! Have fun...${NORMAL}\n"
495 if [ "$IPFIRE_REBUILD" -eq "0" ]; then
496 export IPFIRE_START_TIME
=`date`
501 $0 git update
--force
502 evaluate
1 mail_me UPDATE
504 echo "### EXPORT SOURCES"
506 evaluate
1 mail_me DIST
509 echo "### RUNNING BUILD"
511 evaluate
1 mail_me ERROR
513 echo "### UPLOADING ISO"
515 evaluate
1 mail_me ISO
517 echo -ne "### UPLOADING PAKS"
519 evaluate
1 mail_me PAKS
521 echo -ne "${BOLD}***SUCCESS!${NORMAL}"
527 echo -e "${BOLD}Exit with Ctrl+A, Ctrl+D.${NORMAL}"
533 echo "From: $MAIL_FROM" > /tmp
/ipfire_mail_body.$$
534 echo "To: $MAIL_TO" >> /tmp
/ipfire_mail_body.$$
537 cat <<END >> /tmp/ipfire_mail_body.$$
538 Subject: SUCCESS: IPFIRE-BUILD on `hostname`
539 Building IPFire on `hostname` was successfull!
540 You can find the ISO on your ftp server if you told the script where it is.
544 Started: $IPFIRE_START_TIME
548 Your IPFire-Build-Script
551 echo -ne "${BOLD}***Sending success message${NORMAL}"
554 cat <<END >> /tmp/ipfire_mail_body.$$
555 Subject: ERROR $1: IPFIRE-BUILD on `hostname`
556 When I was building IPFire on `hostname`, I have found an ERROR with name $1!
557 Here you can see the logs and detect the reason for this error.
560 Your IPFire-Build-Script
563 Here is a summary... The full logs are in the attachment.
564 ---------------------------------------------------------
568 echo -ne "${BOLD}***Sending error message${NORMAL}"
573 python tools
/sendEmail
< /tmp
/ipfire_mail_body.$$
574 if [ "$?" -eq "0" ]; then
575 beautify message DONE
577 beautify message FAIL
579 rm -f /tmp
/ipfire_mail_body.$$
584 echo -e "${BOLD}***This will create your configuration...${NORMAL}"
585 echo -ne "***If your are ready press <ENTER>!"
588 echo -ne "***The buildscript will create a full iso image.\n"
589 echo -ne "***If you want to skip any package please enter its name here seperated with space.\n"
590 echo -ne "Actually in the list are: $SKIP_PACKAGE_LIST\n"
591 echo -ne "Do you want to change this? (y/N) "
593 if [ "$YESNO" == "y" ]; then
594 echo -ne "Please type: "
595 read SKIP_PACKAGE_LIST
596 echo -ne "You entered: $SKIP_PACKAGE_LIST\n"
600 echo -ne "***When you have compiled successfully, there is the possibility\n"
601 echo -ne "***to upload the iso image to a ftp server.\n"
602 echo -ne "***If the url is empty there will be no upload.\n"
603 echo -ne "Actually there is: $FTP_ISO_URL\n"
604 echo -ne "Do you want to change this? (y/N) "
606 if [ "$YESNO" == "y" ]; then
607 echo -ne "Please type the url: "
609 echo -ne "Please type the path: "
611 echo -ne "Please type the username: "
613 echo -ne "Please type the password (hidden): "
619 echo -ne "***When you add some new software you can easyly\n"
620 echo -ne "***upload the source code to our repository server.\n"
621 echo -ne "***If the url is empty there will be no upload.\n"
622 echo -ne "Actually there is: $FTP_CACHE_URL\n"
623 echo -ne "Do you want to change this? (y/N) "
625 if [ "$YESNO" == "y" ]; then
626 echo -ne "Please type the url: "
628 echo -ne "Please type the path: "
630 echo -ne "Please type the username: "
632 echo -ne "Please type the password (hidden): "
633 read -s FTP_CACHE_PASS
638 echo -ne "***If there are some important messages you\n"
639 echo -ne "***can get a notification mail.\n"
640 echo -ne "***Please type one ore more email adresses (seperated by comma).\n"
641 echo -ne "Actually there is: $MAIL_TO\n"
642 echo -ne "Do you want to change this? (y/N) "
644 if [ "$YESNO" == "y" ]; then
645 echo -ne "Please type: "
647 echo -ne "You should enter a mail server to login...\n"
648 echo -ne "Please type the url: "
650 echo -ne "Please type where the email is from: "
652 echo -ne "Please type the username: "
654 echo -ne "Please type the password (hidden): "
658 echo -ne "\n${BOLD}***Saving...${NORMAL}"
659 cat <<END > $BASEDIR/.config
661 FTP_ISO_URL=$FTP_ISO_URL
662 FTP_ISO_PATH=$FTP_ISO_PATH
663 FTP_ISO_USER=$FTP_ISO_USER
664 FTP_ISO_PASS=$FTP_ISO_PASS
666 FTP_CACHE_URL=$FTP_CACHE_URL
667 FTP_CACHE_PATH=$FTP_CACHE_PATH
668 FTP_CACHE_USER=$FTP_CACHE_USER
669 FTP_CACHE_PASS=$FTP_CACHE_PASS
673 MAIL_SERVER=$MAIL_SERVER
677 SKIP_PACKAGE_LIST="$SKIP_PACKAGE_LIST"
679 beautify message DONE
684 tar xvfz
$BASEDIR/cache
/tftp-hpa-0.42.
tar.gz
-C $BASEDIR/tmp
685 cd $BASEDIR/tmp
/tftp-hpa-
*
686 .
/configure
--prefix=/ipfire
/trunk
/tools
/ \
687 --sbindir=/ipfire
/trunk
/tools
/ --disable-nls
689 install -c tftpd
/tftpd
$BASEDIR/tools
/in.tftpd
691 rm -rf $BASEDIR/tmp
/tftp-hpa-
*
695 if [ ! -e $BASEDIR/tools
/in.tftpd
]; then
699 if [ "$?" == "0" ]; then
700 $BASEDIR/tools
/in.tftpd
-l -s $BASEDIR/tftpboot
701 beautify message DONE
703 echo -en "You don not have a pxe boot image in your base directory.\nPlease compile first."
704 beautify message FAIL
710 echo -n "Stopping TFTPD..."
711 killall
in.tftpd
>/dev
/null
2>&1
713 killall
-9 in.tftp
>/dev
/null
2>&1
714 beautify message DONE
718 if [ -e $BASEDIR/ipfire-
$VERSION.
$MACHINE-pxe.tgz
]; then
719 mkdir
-p $BASEDIR/tftpboot
720 tar xfz
$BASEDIR/ipfire-
$VERSION.
$MACHINE-pxe.tgz
-C $BASEDIR/tftpboot
727 echo -ne "Checking the translations for missing or obsolete strings..."
728 chmod 755 $BASEDIR/tools
/{check_strings.pl
,sort_strings.pl
,check_langs.sh
}
729 $BASEDIR/tools
/sort_strings.pl en
730 $BASEDIR/tools
/sort_strings.pl de
731 $BASEDIR/tools
/sort_strings.pl fr
732 $BASEDIR/tools
/sort_strings.pl es
733 $BASEDIR/tools
/check_strings.pl en
> $BASEDIR/doc
/language_issues.en
734 $BASEDIR/tools
/check_strings.pl de
> $BASEDIR/doc
/language_issues.de
735 $BASEDIR/tools
/check_strings.pl fr
> $BASEDIR/doc
/language_issues.fr
736 $BASEDIR/tools
/check_strings.pl es
> $BASEDIR/doc
/language_issues.es
737 $BASEDIR/tools
/check_langs.sh
> $BASEDIR/doc
/language_missings
738 beautify message DONE