forked from snapcrafters/eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#!/bin/bash | ||
set +e | ||
|
||
# will update eclipse.home.location and eclipse.p2.data.area towards $SNAP_USER_DATA | ||
## will update on every execution to go along latest revision x1, x2, ... | ||
ECLIPSE_INI=$SNAP_USER_DATA/eclipse.ini | ||
ECLIPSE_INI="$SNAP_USER_DATA/eclipse.ini" | ||
|
||
cp $SNAP/usr/lib/eclipse/eclipse.ini $ECLIPSE_INI | ||
chmod 666 $ECLIPSE_INI | ||
cp "$SNAP/usr/lib/eclipse/eclipse.ini" $ECLIPSE_INI | ||
chmod 600 $ECLIPSE_INI | ||
|
||
mkdir -p $SNAP_USER_DATA/eclipse_home | ||
echo -Declipse.home.location=file:$SNAP_USER_DATA/eclipse_home | tee -a $ECLIPSE_INI | ||
mkdir -p $SNAP_USER_DATA/p2_data | ||
echo -Declipse.p2.data.area=te$SNAP_USER_DATA/p2_data | tee -a $ECLIPSE_INI | ||
mkdir -p "$SNAP_USER_DATA/eclipse_home" | ||
echo "-Declipse.home.location=file:$SNAP_USER_DATA/eclipse_home" | tee -a $ECLIPSE_INI | ||
mkdir -p "$SNAP_USER_DATA/p2_data" | ||
echo "-Declipse.p2.data.area=te$SNAP_USER_DATA/p2_data" | tee -a $ECLIPSE_INI | ||
|
||
EXTRA_ARGS+=("--launcher.ini" "$ECLIPSE_INI") | ||
|
||
# get .gitconfig mapped | ||
ln -sf $SNAP_REAL_HOME/.gitconfig ~/.gitconfig | ||
ln -sf $SNAP_REAL_HOME/.ssh ~/.ssh | ||
EXTRA_ARGS=("--launcher.ini" "$ECLIPSE_INI") | ||
|
||
ln -sf "$SNAP_REAL_HOME/.gitconfig" "$SNAP_USER_DATA/" | ||
ln -sf "$SNAP_REAL_HOME/.ssh" "$SNAP_USER_DATA/" | ||
|
||
# see snap plug personal-workspace | ||
ECLIPSE_WORKSPACE=/home/$USER/eclipse-workspace | ||
echo Using workspace at $ECLIPSE_WORKSPACE. | ||
ECLIPSE_WORKSPACE="/home/$USER/eclipse-workspace" | ||
echo "Using workspace at $ECLIPSE_WORKSPACE." | ||
|
||
set -e | ||
|
||
exec "$SNAP/eclipse" -configuration "${SNAP_USER_DATA}/${SNAP_ARCH}/configuration" -data "$ECLIPSE_WORKSPACE" "${EXTRA_ARGS[@]}" "$@" |