1
0
forked from mir/linux-vm-tools
linux-vm-tools/arch/makepkg.sh
Andrea Manzini 0728c2cc8c
Update makepkg.sh
use mktemp to get a random build directory for safety and  avoid name conflicts
2018-10-03 11:40:47 +02:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#
# This script is for Arch Linux to download and install XRDP+XORGXRDP
#
if [ $(id -u) -eq 0 ] ; then
echo 'This script must be run as a non-root user, as building packages as root is unsupported.' >&2
exit 1
fi
###############################################################################
# Prepare by installing build tools.
#
# Partial upgrades aren't supported in arch.
sudo pacman -Syu --needed --noconfirm base base-devel git
# Create a build directory in tmpfs
TMPDIR=$(mktemp -d)
pushd $TMPDIR
###############################################################################
# XRDP
#
(
git clone https://aur.archlinux.org/xrdp.git
cd xrdp
makepkg -sri --noconfirm
)
###############################################################################
# XORGXRDP
# Devel version, because release version includes a bug crashing gnome-settings-daemon
(
git clone https://aur.archlinux.org/xorgxrdp-devel-git.git
cd xorgxrdp-devel-git
makepkg -sri --noconfirm
)
###############################################################################
#remove build directory
rm -rf $TMPDIR