mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 16:34:18 +09:00
[scripts,bash] reformat bash scripts
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
#!/bin/bash -xe
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
MANIFEST=com.freerdp.FreeRDP
|
||||
|
||||
BUILD_BASE=$(mktemp -d)
|
||||
if [ $# -gt 0 ];
|
||||
then
|
||||
BUILD_BASE=$1
|
||||
if [ $# -gt 0 ]; then
|
||||
BUILD_BASE=$1
|
||||
fi
|
||||
|
||||
echo "Using $BUILD_BASE as temporary build directory"
|
||||
@@ -15,17 +14,15 @@ BUILD=$BUILD_BASE/build
|
||||
STATE=$BUILD_BASE/state
|
||||
|
||||
BUILDER=$(which flatpak-builder)
|
||||
if [ ! -x "$BUILDER" ];
|
||||
then
|
||||
echo "command 'flatpak-builder' could not be found, please install and add to PATH"
|
||||
exit 1
|
||||
if [ ! -x "$BUILDER" ]; then
|
||||
echo "command 'flatpak-builder' could not be found, please install and add to PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FLATPAK=$(which flatpak)
|
||||
if [ ! -x "$FLATPAK" ];
|
||||
then
|
||||
echo "command 'flatpak' could not be found, please install and add to PATH"
|
||||
exit 1
|
||||
if [ ! -x "$FLATPAK" ]; then
|
||||
echo "command 'flatpak' could not be found, please install and add to PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo --user
|
||||
|
||||
@@ -1,34 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z ${FREERDP_SDL_OFF} ];
|
||||
then
|
||||
echo "SDL $(which sdl-freerdp)"
|
||||
sdl-freerdp $@
|
||||
exit $rc
|
||||
if [ -z ${FREERDP_SDL_OFF} ]; then
|
||||
echo "SDL $(which sdl-freerdp)"
|
||||
sdl-freerdp $@
|
||||
exit $rc
|
||||
else
|
||||
if [ -z $XDG_SESSION_TYPE ];
|
||||
then
|
||||
echo "XDG_SESSION_TYPE undefined"
|
||||
exit -1
|
||||
elif [ "$XDG_SESSION_TYPE" = "wayland" ];
|
||||
then
|
||||
if [ -z $FREERDP_WAYLAND_OFF ];
|
||||
then
|
||||
echo "wayland $(which wlfreerdp)"
|
||||
wlfreerdp $@
|
||||
exit $rc
|
||||
else
|
||||
echo "X11 $(which xfreerdp)"
|
||||
xfreerdp $@
|
||||
exit $rc
|
||||
fi
|
||||
elif [ "$XDG_SESSION_TYPE" = "x11" ];
|
||||
then
|
||||
echo "X11 $(which xfreerdp)"
|
||||
xfreerdp $@
|
||||
exit $rc
|
||||
else
|
||||
echo "XDG_SESSION_TYPE $XDG_SESSION_TYPE not handled"
|
||||
exit -1
|
||||
fi
|
||||
if [ -z $XDG_SESSION_TYPE ]; then
|
||||
echo "XDG_SESSION_TYPE undefined"
|
||||
exit -1
|
||||
elif [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
||||
if [ -z $FREERDP_WAYLAND_OFF ]; then
|
||||
echo "wayland $(which wlfreerdp)"
|
||||
wlfreerdp $@
|
||||
exit $rc
|
||||
else
|
||||
echo "X11 $(which xfreerdp)"
|
||||
xfreerdp $@
|
||||
exit $rc
|
||||
fi
|
||||
elif [ "$XDG_SESSION_TYPE" = "x11" ]; then
|
||||
echo "X11 $(which xfreerdp)"
|
||||
xfreerdp $@
|
||||
exit $rc
|
||||
else
|
||||
echo "XDG_SESSION_TYPE $XDG_SESSION_TYPE not handled"
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6,11 +6,10 @@ SCRIPT_PATH=$(realpath "$SCRIPT_PATH")
|
||||
BUILD_DEPS=$(/usr/bin/which dpkg-checkbuilddeps)
|
||||
BUILD_PKG=$(/usr/bin/which dpkg-buildpackage)
|
||||
|
||||
if [ -z "$BUILD_DEPS" ] || [ -z "$BUILD_PKG" ];
|
||||
then
|
||||
echo "dpkg-buildpackage [$BUILD_PKG] and dpkg-checkbuilddeps [$BUILD_DEPS] required"
|
||||
echo "Install with 'sudo apt install dpkg-dev'"
|
||||
exit 1
|
||||
if [ -z "$BUILD_DEPS" ] || [ -z "$BUILD_PKG" ]; then
|
||||
echo "dpkg-buildpackage [$BUILD_PKG] and dpkg-checkbuilddeps [$BUILD_DEPS] required"
|
||||
echo "Install with 'sudo apt install dpkg-dev'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First create a link to the debian/control folder
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
ln -s packaging/deb/freerdp-nightly debian
|
||||
git rev-parse --short HEAD > .source_version
|
||||
ln -s packaging/deb/freerdp-nightly debian
|
||||
git rev-parse --short HEAD >.source_version
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
git rev-parse --short HEAD > source_version
|
||||
git rev-parse --short HEAD >source_version
|
||||
|
||||
Reference in New Issue
Block a user