Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Commit

Permalink
This commit demonstrates the creation of a shar file that may be down…
Browse files Browse the repository at this point in the history
…loaded

by curl and piped directly into /bin/sh. The "HI, THERE" is the execution
of the actual install script.

For example,

 https://url/to/file/dont-use-install-vee.shar | sh
c - ./vee-builddir
c - ./vee-builddir/bin
x - ./vee-builddir/bin/vee
x - ./vee-builddir/bin/veecat
x - ./vee-builddir/bin/veefind
c - ./vee-builddir/man
x - ./vee-builddir/man/vee-reindex.1
x - ./vee-builddir/man/vee.1
x - ./vee-builddir/man/veecat.1
x - ./vee-builddir/man/veels.1
x - ./vee-builddir/man/veerc.5
c - ./vee-builddir/pod
x - ./vee-builddir/pod/veefind.1.pod
x - ./vee-builddir/pod/README
x - ./vee-builddir/pod/vee-hooks.5.pod
x - ./vee-builddir/pod/vee-reindex.1.pod
x - ./vee-builddir/pod/vee.1.pod
x - ./vee-builddir/pod/veecat.1.pod
x - ./vee-builddir/pod/veels.1.pod
x - ./vee-builddir/pod/veerc.5.pod
x - ./vee-builddir/pod/Makefile
x - ./vee-builddir/install-vee.sh
x - ./vee-builddir/.veeprofile
HI, THERE
  • Loading branch information
B. Estrade committed Jul 12, 2014
1 parent 4feecdd commit 0771cd0
Show file tree
Hide file tree
Showing 3 changed files with 744 additions and 51 deletions.
32 changes: 24 additions & 8 deletions build-shar/build-shar.sh
Expand Up @@ -2,28 +2,44 @@

# this script will build the downloadable shar that will install vee locally

rm -rf ./bin ./man ./pod ./tmp .veeprofile > /dev/null 2>&1
WORKDIR=./vee-builddir

rm -rf $WORKDIR > /dev/null 2>&1

mkdir $WORKDIR
cd $WORKDIR
mkdir ./bin ./man

# move utils
cp ../bin/vee ./bin/vee
cp ../bin/veecat ./bin/veecat
cp ../bin/veefind ./bin/veefind
cp ../../bin/vee ./bin/vee
cp ../../bin/veecat ./bin/veecat
cp ../../bin/veefind ./bin/veefind
# set perms
chmod 700 ./bin/*

# generate documentation
cp -r ../pod .
cp -r ../../pod .
cd pod
make all
make all > /dev/null 2>&1

mv -f *.[123456789] ../man
cd ..

cp ../install-vee.sh .

echo "PATH=\$PATH:\$HOME/bin" > .veeprofile
echo "MANPATH=\$MANPATH:\$HOME/man" >> .veeprofile

shar ./bin ./man ./bin/* ./man/* .veeprofile > ./dont-use-install-vee.shar
cd ..

# FreeBSD shar(1)
shar `find $WORKDIR -print` > ./dont-use-install-vee.shar.tmp

echo "# kick off install process" >> ./dont-use-install-vee.shar.tmp
echo "cd $WORKDIR" >> ./dont-use-install-vee.shar.tmp
echo "sh ./install-vee.sh" >> ./dont-use-install-vee.shar.tmp

# filter out the exit at the end that shar(1) added
grep -v "^exit" ./dont-use-install-vee.shar.tmp > ./dont-use-install-vee.shar

rm -rf ./bin ./man ./pod .veeprofile > /dev/null 2>&1
rm -rf $WORKDIR > /dev/null 2>&1

0 comments on commit 0771cd0

Please sign in to comment.