Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

69 lines (56 sloc) 1.562 kB
#!/bin/bash
####################################################################
# Prey Core Setup Routine - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################
# step throught the params and check
until [ -z "$1" ]; do
if [[ "$1" == "-t" || "$1" == "--test" ]]; then
echo -e "\n\033[1m -- TEST MODE ENABLED.\033[0m"
. $base_path/test/include "$2" 2> /dev/null
test_mode=1
elif [[ "$1" == '-c' || "$1" == '--check' ]]; then
echo -e "\n\033[1m -- CHECK MODE ENABLED.\033[0m"
check_mode=1
fi
shift
done
get_os(){
os=`lowercase \`uname\``
if [ "$os" == "windowsnt" ]; then
os=windows
else # linux/mac stuff
if [ "$os" == "darwin" ]; then
os=mac
fi
logged_user=`who | cut -d' ' -f1 | sort -u | tail -1`
readonly root_path='/'
readonly home_path=`eval echo ~`
fi
readonly os
readonly platform_path="$base_path/platform/$os"
PATH=$PATH:$platform_path/bin
}
set_vars(){
getter="curl -s"
tmpdir="/tmp/p${RANDOM}"
patcher='patch'
line_breaker="\n"
}
set_constants(){
readonly lang
readonly start_time=`date +"%F %T"`
readonly tmpdir
readonly logged_user
readonly getter
readonly user_agent="-A Prey/$version ($os)"
readonly mailsender="sendEmail"
readonly control_panel_url="http://control.preyproject.com" 2> /dev/null
readonly updates_url="http://cloud.github.com/downloads/tomas/prey" 2> /dev/null
readonly modules_url=$control_panel_url 2> /dev/null
}
get_os
set_vars
. "$platform_path/settings"
set_constants
Jump to Line
Something went wrong with that request. Please try again.