From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8309f2bc055237c4 X-Google-Attributes: gid103376,public From: lutz@iks-jena.de (Lutz Donnerhacke) Subject: Re: Bit manipulation Date: 2000/11/22 Message-ID: #1/1 X-Deja-AN: 696580471 Distribution: world Content-Transfer-Encoding: 8bit References: <8u8v6n$b7o$1@nnrp1.deja.com> <2WTH$pdrCfOd@eisner.decus.org> <8ub6kt$6nd$1@nnrp1.deja.com> <8ubeq8$cgm$1@nnrp1.deja.com> <3A0D38E9.BB87D8CD@mindspring.com> <8uoq5g$of6$1@nnrp1.deja.com> <8up1j4$uqe$1@nnrp1.deja.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: IKS GmbH Jena Mime-Version: 1.0 User-Agent: slrn/0.9.5.7 (UNIX) Newsgroups: comp.lang.ada Date: 2000-11-22T00:00:00+00:00 List-Id: * Stephen Leake wrote: >lutz@iks-jena.de (Lutz Donnerhacke) writes: >> Giving something back to the community (bash scripts to ease development): >> > >These scripts may be useful, and they even may be well written. But >since there are no comments, and no other descriptions of what they >are supposed to do, or why I might want to use them, I can't tell! > >Bash syntax includes comments; please use them! Ok. function clearall() { # unlinks all temporary files can be regenerated for i in *.ad[bs]; do # all Ada source files if [ -s "$i" ]; then # existing ones j="${i%.*}" # remove extension rm -fv "$i"~ "$i".bak "$j".o "$j".ali "b_$j".c "$j".s ?~"$j".ad[bs] fi done for i in *.[hc] *.cpp; do # all C or C++ source files if [ -s "$i" ]; then j="${i%.*}" rm -fv "$i"~ "$i".bak "$j".o "$j".s fi done for i in *.tex; do # all TeX or LaTeX sources if [ -s "$i" ]; then j="${i%.*}" rm -fv "$i"~ "$i".bak "$j".dvi "$j".aux "$j".toc "$j".lo[ftg] rm -fv "$j".glo "$j".idx "$j".ilg "$j".ind "$j".ind.aux fi done for i in *.mf; do # all METAFONT sources if [ -s "$i" ]; then j="${i%.*}" rm -fv "$i"~ "$i".bak "$j".dvi "$j".log "$j".[1-9]*gf fi done for i in *.web; do # all Web sources (meta programming/documentation l.) if [ -s "$i" ]; then j="${i%.*}" rm -fv "$i"~ "$j".p "$j".tex fi done rm -fv *.txt{~,.bak} # all editor backups of text files } #! /bin/sh DEST="$1" if [ -z "$DEST" ]; then # no argument given => choose best match for DEST in *adb; do # try all files with real work [ -s $(basename "$DEST" b)s ] || break # select those w/o specification done fi DEST=$(basename "$DEST" .adb) # remove extension if gnatmake `[ -s .gnat_opts ] && cat .gnat_opts` "$DEST"; then # Compiles without errors [ -d html/ ] && # there is a documentation directory [ ! -s html/index.htm -o "$DEST" -nt html/index.htm ] && # remake necessary gnathtml.pl -f -d "$DEST" fi -- the \year=2001 TeX calendar; IKS Garamond, 2000; ISBN 3-934601-10-3