Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
janesser committed Jan 20, 2025
1 parent f777f36 commit b25c04a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Eclipse (confined snap edition)
# Eclipse (Unofficial snap distribution of eclipse-*)

Fork from <https://github.com/snapcrafters/eclipse>
Ships a little altered approach

Ships a few altered approaches
* flavored eclipse - any eclipse-package can be snapped
* goes along a latest snap confinement.
Selected touchpoints with the home-directory remain.

* flavored eclipse - any eclipse-package can be snapped, see <https://github.com/snapcrafters/eclipse/pull/10> for discussion related.
* goes along a latest snap confinement. Selected touchpoints with the home-directory remain.
Attempt to merge with other eclipse snaps

Attempt to merge with snapcrafters here: <https://github.com/snapcrafters/eclipse/pull/56>.
* <https://github.com/snapcrafters/eclipse/pull/56>
* <https://github.com/eclipse-linuxtools/eclipse-ide-snap/issues/9>

## Wanna try?

Expand Down
29 changes: 15 additions & 14 deletions snap/local/wrappers/eclipse_confined
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[@]}" "$@"

0 comments on commit b25c04a

Please sign in to comment.