45 lines
1.0 KiB
Bash
Executable File
45 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function install_file()
|
|
{
|
|
install -p -v $* | grep -v "^removed"
|
|
}
|
|
|
|
|
|
#
|
|
# Install source files
|
|
#
|
|
install -d -v -m 755 $EMMENTAL_LIB
|
|
install_file -m 644 emmental.py $EMMENTAL_LIB/emmental.py
|
|
|
|
for dir in `tools/list_install_dirs.py`; do
|
|
install -d -v -m 755 $EMMENTAL_LIB/$dir
|
|
|
|
files=`find $dir -not -name "test_*.py" -name "*.py"`
|
|
install_file -m 644 $files $EMMENTAL_LIB/$dir/
|
|
done
|
|
|
|
|
|
#
|
|
# Install icons
|
|
#
|
|
EMMENTAL_ICONS=$EMMENTAL_SHARE/icons/hicolor/scalable/apps
|
|
install -d -v -m 755 $EMMENTAL_ICONS
|
|
install_file -m 644 data/hicolor/scalable/apps/*.svg $EMMENTAL_ICONS/
|
|
|
|
|
|
#
|
|
# Install and adjust executable
|
|
#
|
|
install -d -v -m 755 $EMMENTAL_BIN
|
|
install_file -m 655 data/emmental $EMMENTAL_BIN/emmental
|
|
sed -i "s|{EMMENTAL_LIB}|$EMMENTAL_LIB|" $EMMENTAL_BIN/emmental
|
|
|
|
|
|
#
|
|
# Install and adjust .desktop file
|
|
#
|
|
install -d -v -m 755 $EMMENTAL_SHARE/applications
|
|
install_file -m 644 data/emmental.desktop $EMMENTAL_SHARE/applications
|
|
sed -i "s|{EMMENTAL_BIN}|$EMMENTAL_BIN|" $EMMENTAL_SHARE/applications/emmental.desktop
|