OSDN Git Service

initial commit
authorarcetera <arcticsn0wdev@gmail.com>
Sat, 7 Nov 2015 14:01:37 +0000 (09:01 -0500)
committerarcetera <arcticsn0wdev@gmail.com>
Sat, 7 Nov 2015 14:01:37 +0000 (09:01 -0500)
.SRCINFO [new file with mode: 0644]
LICENSE [new file with mode: 0644]
PKGBUILD [new file with mode: 0644]
aptpac [new file with mode: 0755]
aptpac.sh [deleted file]

diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644 (file)
index 0000000..af54105
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = aptpac-git
+       pkgdesc = a pacman wrapper with syntax from debian's apt
+       pkgrel = 1
+       url = https://github.com/arcetera/aptpac
+       arch = i686
+       arch = x86_64
+       license = WTFPL
+       makedepends = git
+       depends = sudo
+       source = git://github.com/arcetera/aptpac.git
+       md5sums = SKIP
+
+pkgname = aptpac-git
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..80a9111
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,14 @@
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2015 Abraham Levine <echo iue@trnspljc.890 | tr ietursnpl890jc acprlsurecomed>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644 (file)
index 0000000..624a313
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Abraham Levine <echo iue@trnspljc.890 | tr ietursnpl890jc acprlsurecomed>
+
+pkgname=aptpac-git
+pkgver=
+pkgrel=1
+pkgdesc="a pacman wrapper with syntax from debian's apt"
+arch=('i686' 'x86_64')
+url="https://github.com/arcetera/aptpac"
+license=('WTFPL')
+depends=('sudo')
+makedepends=('git')
+source=('git://github.com/arcetera/aptpac.git')
+md5sums=('SKIP')
+_gitname='aptpac'
+
+pkgver() {
+        cd "$_gitname" &&
+        printf '%s.%s\n' "$(git rev-list --count HEAD)" \
+                         "$(git rev-parse --short HEAD)"
+}
+
+package() {
+        cd "$_gitname" &&
+        install -m 755 -D aptpac "$pkgdir/usr/bin/aptpac"
+}
diff --git a/aptpac b/aptpac
new file mode 100755 (executable)
index 0000000..c328bde
--- /dev/null
+++ b/aptpac
@@ -0,0 +1,81 @@
+#!/bin/bash
+#
+#               __                             
+#              /\ \__                          
+#   __    _____\ \ ,_\ _____     __      ___   
+# /'__`\ /\ '__`\ \ \//\ '__`\ /'__`\   /'___\ 
+#/\ \L\.\\ \ \L\ \ \ \\ \ \L\ /\ \L\.\_/\ \__/ 
+#\ \__/.\_\ \ ,__/\ \__\ \ ,__\ \__/.\_\ \____\
+# \/__/\/_/\ \ \/  \/__/\ \ \/ \/__/\/_/\/____/
+#           \ \_\        \ \_\                 
+#            \/_/         \/_/    
+# a pacman wrapper with syntax based on debian's apt
+# (c) arcetera 2015 - wtfpl
+
+SYNTAX=$1
+INPUT=$2
+
+if [ "$SYNTAX" == "install" ]
+then
+        sudo pacman -S $INPUT
+elif [ "$SYNTAX" == "search" ]
+then
+        pacman -Ss $INPUT
+elif [ "$SYNTAX" == "remove" ]
+then
+        sudo pacman -Rs $INPUT
+elif [ "$SYNTAX" == "upgrade" ]
+then
+        sudo pacman -Syu
+elif [ "$SYNTAX" == "update" ]
+then
+        sudo pacman -Sy
+        echo "run aptpac upgrade *immediately*. pacman does not support partial upgrades. running merely 'upgrade' would suffice. failure to do this could result in a broken installation."
+elif [ "$SYNTAX" == "download" ]
+then
+        sudo pacman -Sw $INPUT
+elif [ "$SYNTAX" == "autoremove" ]
+then
+        sudo pacman -Qdtq | pacman -Rs -
+elif [ "$SYNTAX" == "show" ]
+then
+        pacman -Qi $INPUT
+elif [ "$SYNTAX" == "clean" ]
+then
+        sudo pacman -Sc
+elif [ "$SYNTAX" == "autoclean" ]
+then
+        sudo pacman -Sc
+elif [ "$SYNTAX" == "policy" ]
+then
+        less /etc/pacman.d/mirrorlist
+elif [ "$SYNTAX" == "list" ]
+then
+        pacman -Q
+elif [ "$SYNTAX" == "listmore" ]
+then
+        pacman -Qi
+elif [ "$SYNTAX" == "listless" ]
+then
+        pacman -Q | wc -l
+elif [ "$SYNTAX" == "build" ]
+then
+        makepkg -sri
+else
+        echo "aptpac: a pacman wrapper with apt syntax"
+        echo "no argument/invalid argument - print this help"
+        echo "install - installs a package"
+        echo "search - searches for a package in the repos"
+        echo "remove - removes a package"
+        echo "upgrade - upgrades the system fully, refreshing repos and upgrading packages"
+        echo "update - only refreshes the repos (bad practice, do not run this without running 'upgrade' immediately after"
+        echo "download - only download a package into pacman's cache without installing it"
+        echo "autoremove - remove dependencies that are no longer needed (usually should not be needed as 'remove' should remove dependencies along with the package)"
+        echo "show - shows information about the package"
+        echo "clean/autoclean - clears pacman's cache"
+        echo "policy - prints mirrorlist"
+        echo "list - lists all installed packages"
+        echo "listmore - lists all installed packages with all info"
+        echo "listless - lists how many packages are installed"
+        echo "build - builds package from PKGBUILD"
+fi
diff --git a/aptpac.sh b/aptpac.sh
deleted file mode 100755 (executable)
index 2b66220..0000000
--- a/aptpac.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# A pacman wrapper with APT syntax
-# Developed by arcetera
-
-echo 'i have no idea what i am doing'
-
-echo 'thanks rob you suck'