Skip to content

Commit 8522f1c

Browse files
committed
Add install.sh and README
1 parent f097c08 commit 8522f1c

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# code-nautilus
2-
VSCode extension for Nautilus
2+
3+
This repo provides a visual studio code extension for Nautilus.
4+
5+
# Install Extension
6+
7+
```
8+
wget -qO- https://raw.githubusercontent.com/cra0zy/code-nautilus/master/install.sh | bash
9+
```

install.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Install python-nautilus
4+
echo "Installing python-nautilus..."
5+
if type "pacman" > /dev/null 2>&1
6+
then
7+
sudo pacman -S python-nautilus
8+
elif type "apt-get" > /dev/null 2>&1
9+
then
10+
sudo apt-get install -y python-nautilus
11+
elif type "dnf" > /dev/null 2>&1
12+
then
13+
sudo dnf install -y nautilus-python
14+
else
15+
echo "Failed to find python-nautilus, please install it manually."
16+
fi
17+
18+
# Remove previous version and setup folder
19+
echo "Removing previous version (if found)..."
20+
mkdir -p ~/.local/share/nautilus-python/extensions
21+
rm -f ~/.local/share/nautilus-python/extensions/VSCodeExtension.py
22+
rm -f ~/.local/share/nautilus-python/extensions/code-nautilus.py
23+
24+
# Download and install the extension
25+
echo "Downloading newest version..."
26+
wget --show-progress -O ~/.local/share/nautilus-python/extensions/code-nautilus.py https://raw.githubusercontent.com/cra0zy/code-nautilus/master/code-nautilus.py
27+
28+
# Restart nautilus
29+
echo "Restarting nautilus..."
30+
nautilus -q
31+
32+
echo "Installation Complete"

0 commit comments

Comments
 (0)