Skip to content

Instantly share code, notes, and snippets.

@omarstreak
Created January 18, 2013 01:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save omarstreak/4561451 to your computer and use it in GitHub Desktop.
Save omarstreak/4561451 to your computer and use it in GitHub Desktop.
Bash script to install XAR. Run as root and takes one command line argument where you want the xar executable to exist.
#!/bin/bash
if [ "`whoami`" != "root" ]; then
printf "Please run this script as root or using sudo\n"
exit 0
fi
LIB_DIR=$1
CURRENT_DIR=`pwd`
printf "Setting up XAR\n"
XAR=xar-1.6.1
cp $XAR.tar.gz $LIB_DIR/
cd $LIB_DIR
tar -xzvf $XAR.tar.gz
rm $XAR.tar.gz
cd $XAR
./configure
make
sudo make install
cd $CURRENT_DIR
printf "******************************\n"
printf "xar setup!\n"
printf "******************************\n"
@hwfwalton
Copy link

The inconsistent whtitespace characters on lines 3/4 are driving me crazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment