-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPkgMgrs.rb
48 lines (43 loc) · 1.31 KB
/
PkgMgrs.rb
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env ruby
#Add your package managers here
$debianBased="apt-get"
$archLinux="pacman"
$voidLinux="xbps-install"
#command binding methods for different package managers
def pacman()
$installCmd = "pacman -S"
$reinstallCmd = "pacman -S --force"
$searchCmd = "pacman -Ss"
$updateCmd = "pacman -Su"
$syncCmd = "pacman -Sy"
$syncANDupdateCmd = "pacman -Syu"
$refreshSyncCmd = "pacman -Syy"
$removeCmd = "pacman -R"
$recursiveRemoveCmd = "pacman -Rdd"
$checkUpdatesCmd = "checkupdates"
$cleanCmd = "pacman -Rsn $(pacman -Qdtq)"
end
def apt_get()
$installCmd = "apt-get install"
$reinstallCmd = "apt-get install --reinstall"
$searchCmd = "apt-cache search"
$updateCmd = "apt-get upgrade"
$syncCmd = "apt-get update"
$syncANDupdateCmd = "apt-get update; sudo apt-get upgrade"
$refreshSyncCmd = "apt-get update"
$removeCmd = "apt-get remove"
$recursiveRemoveCmd = "apt-get --purge remove"
$cleanCmd = "apt-get autoremove"
end
def xbps_install()
$installCmd = "xbps-install"
$reinstallCmd = "xbps-install -f"
$searchCmd = "xbps-query -Rs"
$updateCmd = "xbps-install -u"
$syncCmd = "xbps-install -S"
$syncANDupdateCmd = "xbps-install -Su"
$refreshSyncCmd = "xbps-install -f -S"
$removeCmd = "xbps-remove"
$recursiveRemoveCmd = "xbps-remove -f"
$cleanCmd = "xbps-remove -O"
end