Linux HOWTOs

About | Home | Search


HOWTO: tidyp
Description: HTML (< 5) validator and beautifier
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# tidyp 1.04
# ==========
# This is required by the HTML::Tidy Perl module

# Get it
cd
test -f installed/tidyp-1.04.tar.gz && mv -f installed/tidyp-1.04.tar.gz .
test ! -f tidyp-1.04.tar.gz &&
 wget --no-check-certificate \
https://github.com/downloads/petdance/tidyp/tidyp-1.04.tar.gz

# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "tidyp-*" exec rm -r {} \;
tar xzvf ~/tidyp-1.04.tar.gz
cd tidyp-1.04
test $UID = 0 && chown -R root:root .

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' && ./configure --libdir=/usr/local/lib64

# Configure the build for anything else
test $(uname -m) != 'x86_64' && ./configure

# Build it
make

# Become root to install it
su

# Install it
make install
ldconfig

# Become your non-root user again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/tidyp-*.tar.gz
mv -f tidyp-1.04.tar.gz installed/


# If you ever want to uninstall tidyp, this should do it:
cd
su
test -d src/tidyp-* && ( cd src/tidyp-* ; make uninstall )
test -d /usr/local/include/tidyp && rm -r /usr/local/include/tidyp
test -d /usr/local/lib64 && rm -f /usr/local/lib64/libtidyp.*
rm -f /usr/local/bin/tidyp /usr/local/lib/libtidyp.*
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "tidyp-*" -exec rm -r {} \;
rm -f ~/installed/tidyp-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>