mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Add some easy way to install
I know that this should be done using some sort of build system (like meson), but the player is still far from finished and a basic install script should be sufficient for the time being, if anyone wishes to test it.
This commit is contained in:
37
install.sh
Executable file
37
install.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
LICENSES_DIR="/usr/local/share/licenses/clapper"
|
||||
DOC_DIR="/usr/local/share/doc/clapper"
|
||||
MAIN_DIR="/usr/local/share/clapper"
|
||||
BIN_DIR="/usr/local/bin"
|
||||
GJS_DIR="/usr/local/share/gjs-1.0"
|
||||
|
||||
SCRIPT_ERR="Error: this script must be"
|
||||
|
||||
if [ ! -d "./clapper_src" ]; then
|
||||
echo "$SCRIPT_ERR run from clapper directory!" 1>&2
|
||||
exit 1
|
||||
elif [ "$EUID" -ne 0 ]; then
|
||||
echo "$SCRIPT_ERR run as root!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating directories..."
|
||||
mkdir -p "$LICENSES_DIR"
|
||||
mkdir -p "$DOC_DIR"
|
||||
mkdir -p "$MAIN_DIR"
|
||||
mkdir -p "$GJS_DIR"
|
||||
mkdir -p "$BIN_DIR"
|
||||
|
||||
echo "Copying files..."
|
||||
cp -f "./COPYING" "$LICENSES_DIR/"
|
||||
cp -f "./README.md" "$DOC_DIR/"
|
||||
cp -rf "./clapper_src" "$MAIN_DIR/"
|
||||
cp -f "./main.js" "$MAIN_DIR/"
|
||||
cp -f "./gjs-1.0/clapper.js" "$GJS_DIR/"
|
||||
cp -f "./bin/clapper" "$BIN_DIR/"
|
||||
|
||||
echo "Creating executables..."
|
||||
chmod +x "$BIN_DIR/clapper"
|
||||
|
||||
echo "Install finished"
|
Reference in New Issue
Block a user