-
Notifications
You must be signed in to change notification settings - Fork 78
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
4 changed files
with
35 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
import platform | ||
import sys | ||
|
||
def install_ctags(): | ||
# Check if the operating system is not Windows | ||
if platform.system() != 'Windows': | ||
# Detect the package manager based on the distribution | ||
if os.path.exists('/usr/bin/apt-get'): | ||
# Detect if already installed | ||
if os.path.exists('/usr/bin/ctags'): | ||
return | ||
# Debian-based systems (like Ubuntu) | ||
os.system('sudo apt-get update && sudo apt-get install -y ctags') | ||
elif os.path.exists('/usr/bin/yum'): | ||
# Detect if already installed | ||
if os.path.exists('/usr/bin/ctags'): | ||
return | ||
# Red Hat-based systems (like Fedora or CentOS) | ||
os.system('sudo yum install -y ctags') | ||
elif os.path.exists('/usr/bin/pacman'): | ||
# Detect if already installed | ||
if os.path.exists('/usr/bin/ctags'): | ||
return | ||
# Arch-based systems | ||
os.system('sudo pacman -Syu --noconfirm ctags') | ||
else: | ||
print("Unsupported Linux distribution or missing package manager.") | ||
sys.exit(1) | ||
else: | ||
print("This script does not support Windows.") | ||
sys.exit(1) |
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,4 +1,5 @@ | ||
|
||
import setup | ||
import unittest | ||
import os | ||
from thepipe import extract # Assuming thepipe has an extract function | ||
|
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