#!/bin/shSKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`echo ""echo "toppler-1.1.2-fc4-i686-bin" echo "this package is built for Fedora Core 4 on i686 architecture"echo ""echo "!!! You must be root to install this package !!!"echo ""echo -n "Options: Type i to install, r to remove, or any other key to quit? "read switchif [ "$switch" == "i" ]; then echo "Installing ... stand by" tail +$SKIP $0 | tar xz -C /usr/local echo "Done"elif [ "$switch" == "r" ]; then echo "Removing ... stand by" rm /usr/local/bin/toppler rm /usr/local/man/man6/toppler.6 rm /usr/local/share/applications/toppler.desktop rm /usr/local/share/doc/toppler/AUTHORS rm /usr/local/share/doc/toppler/ChangeLog rm /usr/local/share/doc/toppler/COPYING rm /usr/local/share/doc/toppler/NEWS rm /usr/local/share/doc/toppler/README rmdir /usr/local/share/doc/toppler rm /usr/local/share/locale/de/LC_MESSAGES/toppler.mo rm /usr/local/share/locale/fi/LC_MESSAGES/toppler.mo rm /usr/local/share/locale/fr/LC_MESSAGES/toppler.mo rm /usr/local/share/locale/pt/LC_MESSAGES/toppler.mo rm /usr/local/share/locale/sv/LC_MESSAGES/toppler.mo rm /usr/local/share/pixmaps/toppler.xpm rm /usr/local/share/toppler/abc.ttm rm /usr/local/share/toppler/ball2.ttm rm /usr/local/share/toppler/m1.ttm rm /usr/local/share/toppler/pasi2.ttm rm /usr/local/share/toppler/ball1.ttm rm /usr/local/share/toppler/ball3.ttm rm /usr/local/share/toppler/m2.ttm rm /usr/local/share/toppler/toppler.dat rmdir /usr/local/share/toppler rm /usr/local/var/toppler/toppler.hsc rmdir /usr/local/var/toppler echo "Done"else exit 1fiexit 0__ARCHIVE_FOLLOWS__
#!/bin/shif [ -a /tmp/Sirx ]; then rm -rf /tmp/Sirxfimkdir /tmp/Sirxmkdir /tmp/Sirx/localecho "Build package from [s]ource or from [b]inary? "read packif [ "$pack" == "s" ]; then mkdir /tmp/Sirx/source echo "Path to folder containing configure and/or Makefile? " read inputsource cd "$inputsource" cp -r * /tmp/Sirx/source cd /tmp/Sirx/source if [ -a configure ]; then if ./configure --prefix=/usr/local ; then echo "configure complete" else echo "!configure failed!" read dummy exit 1 fi fi if make ; then echo "make complete" else echo "!make failed!" read dummy exit 1 fi if make prefix=/tmp/Sirx/local install ; then echo "make install complete" else echo "!make install failed!" read dummy exit 1 fielif [ "$pack" == "b" ]; then echo "Path to folder containing binary? " read inputbinary cd "$inputbinary" cp -r * /tmp/Sirx/localelse echo "!Incorrect input!" read dummy exit 1ficd /tmp/Sirx/localecho "Name of output package file? "read outputfilenametar -czf /tmp/Sirx/"$outputfilename".tar.gz *find -type f > /tmp/Sirx/remove.txtcd /tmp/Sirx/sed 's/\./\/usr\/local/' remove.txt > removefixed.txtecho "#!/bin/sh" > header.shecho SKIP=\`awk \'\/\^__ARCHIVE_FOLLOWS__\/ { print NR + 1\; exit 0\; }\' \$0\` >> header.shecho \echo \""$outputfilename"\" >> header.shecho \echo \"Select: \[i\]nstall, \[r\]emove, e\[x\]tract, or any other key to quit\? \" >> header.shecho "read switch" >> header.shecho \if \[ \"\$switch\" == \"i\" \]\; \then >> header.shecho \echo \"Installing . . .\" >> header.shecho \tail +\$SKIP \$0 \| tar xz -C \/usr\/local >> header.shecho \echo \"Done\" >> header.shecho \elif \[ \"\$switch\" == \"r\" \]\; \then >> header.shecho \echo \"Removing . . .\" >> header.shwhile read linedo echo rm "$line" >> header.shdone < removefixed.txtecho \echo \"Done\" >> header.shecho \elif \[ \"\$switch\" == \"x\" \]\; \then >> header.shecho \echo \"Extract directory\? \" >> header.shecho "read extract" >> header.shecho \echo \"Extracting . . .\" >> header.shecho \tail +\$SKIP \$0 \| tar xz -C \"\$extract\" >> header.shecho \echo \"Done\" >> header.shecho "else" >> header.shecho "exit 1" >> header.shecho "fi" >> header.shecho "exit 0" >> header.shecho "__ARCHIVE_FOLLOWS__" >> header.shcat header.sh "$outputfilename".tar.gz > $HOME/"$outputfilename".shcd $HOMEecho "Finished, check your home folder . . . press [Enter] to quit"read dummyrm -rf /tmp/Sirxexit 0
You wonder how efficient this system really is ... not at all efficient. I was really surprised by how easily and quickly RPMS install compared to the Window$ way. With rpm it takes like 2 steps max and installs nearly instantly. I'm never going back to Window$ ... or any of their inefficient bullshit.
What would be better is something along the lines of a self extracting zip file with a self deletion program in the installed directory.
even if you're renting you've got more rights than if you're using windows.
#!/bin/shif [ -a /tmp/Sirx ]; then rm -rf /tmp/Sirxfimkdir /tmp/Sirxmkdir /tmp/Sirx/localecho "Build package from [s]ource or from [b]inary? "read packecho "Install path? "read installpathif [ "$pack" == "s" ]; then mkdir /tmp/Sirx/source echo "Path to folder containing configure and/or Makefile? " read inputsource cd "$inputsource" cp -r * /tmp/Sirx/source cd /tmp/Sirx/source if [ -a configure ]; then if ./configure --prefix="$installpath" ; then echo "configure complete" else echo "!configure failed!" read dummy exit 1 fi fi if make ; then echo "make complete" else echo "!make failed!" read dummy exit 1 fi if make prefix=/tmp/Sirx/local install ; then echo "make install complete" else echo "!make install failed!" read dummy exit 1 fielif [ "$pack" == "b" ]; then echo "Path to folder containing binary? " read inputbinary cd "$inputbinary" cp -r * /tmp/Sirx/localelse echo "!Incorrect input!" read dummy exit 1ficd /tmp/Sirx/localecho "Name of output package file? "read outputfilenametar -czf /tmp/Sirx/"$outputfilename".tar.gz *find -type f > /tmp/Sirx/remove.txtcd /tmp/Sirx/sed 's/\.//' remove.txt > removefixed.txtecho "#!/bin/sh" > header.shecho SKIP=\`awk \'\/\^__ARCHIVE_FOLLOWS__\/ { print NR + 1\; exit 0\; }\' \$0\` >> header.shecho 'echo' \""$outputfilename"\" >> header.shecho 'echo "Select: [i]nstall, [r]emove, e[x]tract, or any other key to quit? "' >> header.shecho "read switch" >> header.shecho 'if [ "$switch" == "i" ]; then' >> header.shecho 'echo "Installing . . ."' >> header.shecho 'tail +$SKIP $0 | tar xz -C '"$installpath" >> header.shecho 'echo "Done"' >> header.shecho 'elif [ "$switch" == "r" ]; then' >> header.shecho 'echo "Removing . . ."' >> header.shwhile read linedo echo rm "$installpath""$line" >> header.shdone < removefixed.txtecho 'echo "Done"' >> header.shecho 'elif [ "$switch" == "x" ]; then' >> header.shecho 'echo "Extract directory? "' >> header.shecho "read extract" >> header.shecho 'echo "Extracting . . ."' >> header.shecho 'tail +$SKIP $0 | tar xz -C "$extract"' >> header.shecho 'echo "Done"' >> header.shecho "else" >> header.shecho "exit 1" >> header.shecho "fi" >> header.shecho "exit 0" >> header.shecho "__ARCHIVE_FOLLOWS__" >> header.shcat header.sh "$outputfilename".tar.gz > $HOME/"$outputfilename".shcd $HOMEecho "Finished, check your home folder . . . press [Enter] to quit"read dummyrm -rf /tmp/Sirxexit 0
I like binaries ... but not Window$ installers ... after switching to Linux, I realized how retarded the Window$ installers really are. They all go something like this if I remember correctly:Double-click the exe file ... it loads after 1-2 min"Blah, Blah, Blah, Blah, Blah, Blah ... click next" -> you click next"Do you accept this 200 page EULA ?" Only option: Yes -> you click yesclick next 5 times"Install to /Program File$ ?" -> yesclick next 5 more times"Installing" ... 30-45 minutes later ... DoneAnd you goto the next installer and do it over again !!!
If you want Linux installers try Loki ... too bad they went out of business.
"Installing" ... 30-45 minutes later ... DoneAnd you goto the next installer and do it over again !!!