-
Notifications
You must be signed in to change notification settings - Fork 1
/
make-insync-rpm-container.sh
33 lines (26 loc) · 1 KB
/
make-insync-rpm-container.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
CONTAINER=fedora-distrobox
DISTRO=fedora
VERSION=40
INSYNC_RPM=https://cdn.insynchq.com/builds/linux/3.9.4.60020/insync-3.9.4.60020-fc40.x86_64.rpm
# insync download links json https://cdn.insynchq.com/web/webflow/js/linux_download_links.js
# in var = linux_download_links
# Create Distrobox container
distrobox rm $CONTAINER
distrobox create --name $CONTAINER --image $DISTRO:$VERSION
# Enter the container and perform all necessary steps
distrobox enter $CONTAINER -- bash -c "
sudo dnf install -y chromium
curl -o insync.rpm $INSYNC_RPM &&
sudo dnf install -y ./insync.rpm &&
# Export Insync as a host application
distrobox-export --app insync --extra-flags 'start' &&
# Start Insync inside the container
insync start
"
# Ensure Insync starts at login by copying the .desktop file
if ! cp ~/.local/share/applications/$CONTAINER-insync.desktop ~/.config/autostart/; then
echo "Failed to copy .desktop file to autostart. Exiting."
exit 1
fi
echo "Insync setup completed."