Re: [AD] Preparing 4.2.1, issues |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2006-01-30, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> > You forgot to attach.
>
> I hate when I do that... I've grown used to kmail warning when I almost do
> that... I'm not sure why it didn't this time. Attached now.
>
> Evert
> --- misc/zipup.sh 2006-01-29 23:23:41.000000000 +0100
> +++ ../zipup.sh 2006-01-29 23:23:08.000000000 +0100
> @@ -25,6 +25,21 @@
> name=$(echo "$1" | sed -e 's/.*[\\\/]//; s/\.zip//')
> prev=$(echo "$2" | sed -e 's/.*[\\\/]//; s/\.zip//')
>
> +# Check that the working directory is called `allegro'
> +cdir=$(pwd | sed -e 's/.*[\\\/]//')
Easier: cdir=$(basename $(pwd))
`orig_dir' is a better name.
> +if test $cdir != allegro; then
> + echo Current directory is not called allegro!
> + echo Trying to make a symlink...
> + if test -e "../allegro"; then
> + echo A file called ../allegro already exists. Please move it out of the way first.
> + exit 1
> + else
> + mkdir ../allegro
> + cp -r * ../allegro
> + cd ../allegro
> + fi
> +fi
I think if the directory is not called allegro and we can't make the
symlink, then just abort and ask the user to solve it himself.
> @@ -270,6 +285,9 @@
>
> fi
>
> +# Change back to previous directory
> +cd ../$cdir
This might not be needed if it's at the end of the script (I didn't
check).
> +rm -rf ../allegro
That's kinda dangerous, and not really necessarily if you follow what I
wrote above.
Peter