Skip to content

Instantly share code, notes, and snippets.

@jeromelebleu
Last active January 22, 2016 19:59
Show Gist options
  • Save jeromelebleu/bf53df877980228ac5cb to your computer and use it in GitHub Desktop.
Save jeromelebleu/bf53df877980228ac5cb to your computer and use it in GitHub Desktop.
Deploy development environment for YunoHost CLI & API
#!/bin/bash
set -e
set -x
if [ "$#" -ne "1" ]; then
echo "Usage: $0 DESTDIR"
exit 1
fi
DESTDIR=$1
# Check DESTDIR
if [ -d $DESTDIR ]; then
echo "Error: $DESTDIR already exists"
exit 1
fi
# Clone moulinette
git clone https://github.com/YunoHost/moulinette $DESTDIR
DESTDIR=$(cd $DESTDIR; pwd)
# Clone yunohost
YUNOHOST_DIR=$(cd $DESTDIR/../; pwd)/yunohost
YUNOHOST_RELDIR="../yunohost"
git clone https://github.com/YunoHost/yunohost $YUNOHOST_DIR
# Add symlink to lib/yunohost and locales from yunohost
cd $DESTDIR/lib && \
ln -sv ../$YUNOHOST_RELDIR/src/yunohost .
cd $DESTDIR/lib/yunohost && \
ln -sv ../../$YUNOHOST_RELDIR/locales .
# Create bin directory and add symlink from yunohost
mkdir $DESTDIR/bin
cd $DESTDIR/bin && \
ln -sv ../$YUNOHOST_RELDIR/bin/yunohost{-api,} .
# Add symlink to data/actionsmap from yunohost
cd $DESTDIR/data/actionsmap && \
ln -sv ../../$YUNOHOST_RELDIR/data/actionsmap/*.yml .
cd $DESTDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment