-
Notifications
You must be signed in to change notification settings - Fork 5
/
install
48 lines (41 loc) · 963 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#
# Parallels Tools for Linux installer entry point
#
# Copyright (c) 1999-2017 Parallels International GmbH.
# All rights reserved.
# http://www.parallels.com
BASE_DIR=$(dirname "$(readlink -f "$0")")
INSTALLER_DIR=$BASE_DIR/installer
if [[ $# > 0 ]]; then
# we run this script only if run without any parameters
exec "$INSTALLER_DIR/install-cli.sh" "$@"
fi
check_requirements() {
if [[ "$(uname -s)" != "Linux" ]]; then
echo "Error: these Parallels Guest Tools can be installed on" \
"Linux guest OS only." >&2
exit 101
fi
if [[ "$(id -u)" != "0" ]]; then
echo "Error: you do not have permissions to" \
"run this script." >&2
exit 102
fi
}
check_requirements
case "$(uname -m)" in
x86_64)
FLAG_CHECK_GUI="Yes"
exec "$INSTALLER_DIR/installer.x86_64"
;;
i686)
FLAG_CHECK_GUI="Yes"
exec "$INSTALLER_DIR/installer.x86_32"
;;
*)
echo "Arhitecture $(uname -m) is not supported" >&2
exit 103
;;
esac
exit $?