-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of the dirs [ package, source], and update the file [ README…
….md ]
- Loading branch information
1 parent
797b490
commit d2c1b39
Showing
19 changed files
with
3,744 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# meo | ||
The `meo` program is a package manager for the programs available on the `baldeuniversel/linux` repository | ||
The **meo** program is a package manager for all programs available on the | ||
<br /> | ||
`baldeuniversel/linux` repository . | ||
|
||
--- | ||
|
||
|
||
You could first install the **meo** program to manage (install, remove, update ...) | ||
<br /> | ||
the packages that are on the `baldeuniversel/linux` repository . | ||
|
||
**Hash-package** : **md5sum(d86f38dcb03aa379b72133e5c9a90f04)** | ||
<br /> | ||
**Code-name** : **Ve-Quantic** | ||
|
||
|
||
After installing the **meo** program, from your terminal execute this command | ||
<br /> | ||
**meo --help** or **meo --doc** or **man meo** to see how to use the **meo** program . |
Binary file not shown.
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,5 @@ | ||
{ | ||
package: meo , | ||
version: 1.1.8 , | ||
pkg-md5sum: d86f38dcb03aa379b72133e5c9a90f04 | ||
} |
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,14 @@ | ||
/** | ||
* The <<meo>> program allows to manage available packages of the | ||
* Github repository `https://github.com/baldeuniversel/linux.git` | ||
* (Use from the terminal) . | ||
* | ||
* Otherwise <<meo>> program is a package manager for all programs | ||
* of this Github repository `https://github.com/baldeuniversel/linux` | ||
* at the level of the `main` branch. So, you could first install the | ||
* <<meo>> program to manage(install, remove, update ...) the packages | ||
* that are on this Github repository(in the main branch) . | ||
* | ||
* After installing the <<meo>> program, from your terminal execute this | ||
* command `meo --help` or `meo --doc` to see how to use the <<meo>> program . | ||
*/ |
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,9 @@ | ||
Package: meo | ||
Version: 1.1.8 | ||
Section: base | ||
Priority: optional | ||
Architecture: all | ||
Maintainer: Baldé <[email protected]> | ||
Depends: bash, coreutils, dpkg, curl, bc, debianutils, git, awk, gawk, zsh, util-linux | ||
Description: The <<meo>> program allows to manage the available packages from the Github \ | ||
repository `https://github.com/baldeuniversel/linux.git` (Use from the terminal) |
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,175 @@ | ||
#!/usr/bin/bash | ||
|
||
##### | ||
# postinst script | ||
#### | ||
|
||
|
||
set -uo pipefail | ||
|
||
|
||
|
||
# Declaration variables | ||
getTheDebProgram="" | ||
getTheInfoPkg="" | ||
getTheReadmeFile="" | ||
|
||
getMngDebDirectory="/usr/lib/meo/library/packages-info/meo/deb" | ||
getMngInfoDirectory="/usr/lib/meo/library/packages-info/meo/info" | ||
getTmpCloneGit="/tmp/.$USER/meo/download-branch" | ||
getBranch="meo" | ||
getProgram="meo" | ||
getNameInfoPkg="info-pkg" | ||
getURL="https://github.com/baldeuniversel/linux.git" | ||
|
||
meoTmpDir="/tmp/.$USER/meo/github" | ||
meoInfoDir="/usr/lib/meo/library/info" | ||
meoListAvailablePkgsPure="/usr/lib/meo/library/info/list-available-packages-pure" | ||
meoListAvailablePkgs="/usr/lib/meo/library/info/list-available-packages" | ||
meoListInstalledPkgsPure="/usr/lib/meo/library/info/list-installed-packages-pure" | ||
|
||
getCurrentFileVersionPkgs="current-version-pkgs" | ||
getURL="https://github.com/baldeuniversel/linux.git" | ||
|
||
|
||
|
||
# Create some directories | ||
if [[ ! -e "$meoInfoDir" ]] | ||
then | ||
# | ||
mkdir -p "$meoInfoDir" 2> /dev/null | ||
|
||
if [[ $? -ne 0 ]] | ||
then | ||
echo "~" | ||
echo -e "Something is wrong, make sure you have the right to install packages \U001F6A8 " | ||
|
||
exit 1 | ||
fi | ||
fi | ||
# | ||
if [[ ! -e "$getMngDebDirectory" ]] | ||
then | ||
# | ||
mkdir -p "$getMngDebDirectory" 2> /dev/null | ||
else | ||
# | ||
rm -fr "$getMngDebDirectory" 2> /dev/null | ||
|
||
mkdir -p "$getMngDebDirectory" 2> /dev/null | ||
fi | ||
# | ||
if [[ ! -e "$getMngInfoDirectory" ]] | ||
then | ||
# | ||
mkdir -p "$getMngInfoDirectory" 2> /dev/null | ||
else | ||
# | ||
rm -fr "$getMngInfoDirectory" 2> /dev/null | ||
|
||
mkdir -p "$getMngInfoDirectory" 2> /dev/null | ||
fi | ||
# | ||
if [[ -e "$getTmpCloneGit" ]] | ||
then | ||
rm -fr "$getTmpCloneGit" 2> /dev/null | ||
else | ||
mkdir -p "$getTmpCloneGit" 2> /dev/null | ||
fi | ||
# | ||
if [[ -e "$meoTmpDir" ]] | ||
then | ||
rm -fr "$meoTmpDir" 2> /dev/null | ||
else | ||
mkdir -p "$meoTmpDir" 2> /dev/null | ||
fi | ||
|
||
|
||
|
||
# Clone the branch | ||
git clone --branch "$getBranch" --single-branch --depth 1 "$getURL" "$getTmpCloneGit/linux" 2> /dev/null | ||
|
||
# | ||
if [[ ! ( $? -eq 0 ) ]] | ||
then | ||
echo "" | ||
echo "~" | ||
echo -e "Your internet connection seems not to be established \U001F30D " | ||
echo "" | ||
|
||
exit 1 | ||
fi | ||
|
||
|
||
|
||
### Sequence for the `deb` package management` -> start tag[m0] | ||
# | ||
getTheDebProgram=` find "$getTmpCloneGit/linux/package" -name "$getProgram*.deb" -type f 2> /dev/null ` | ||
getTheInfoPkg=` find "$getTmpCloneGit/linux/package" -name "$getNameInfoPkg" -type f 2> /dev/null ` | ||
getTheReadmeFile=` find "$getTmpCloneGit/linux/package" -name "readme" -type f 2> /dev/null ` | ||
|
||
# Move the deb program | ||
mv "$getTheDebProgram" "$getMngDebDirectory" 2> /dev/null | ||
mv "$getTheInfoPkg" "$getMngInfoDirectory" 2> /dev/null | ||
mv "$getTheReadmeFile" "$getMngInfoDirectory" 2> /dev/null | ||
|
||
### Sequence for the `deb` package management` -> end tag[m0] | ||
|
||
|
||
|
||
### Sequence for the deployment some useful files -> start tag[s0] | ||
# | ||
# Clone the git repository | ||
git clone --branch "$getCurrentFileVersionPkgs" --single-branch --depth 1 "$getURL" "$meoTmpDir/linux" 2> /dev/null | ||
|
||
# | ||
if [[ $? -ne 0 ]] | ||
then | ||
echo "" | ||
echo "~" | ||
echo -e "Your internet connection seems not to be established \U001F30D " | ||
echo "" | ||
|
||
exit 1 | ||
fi | ||
|
||
# | ||
if [[ $? -eq 0 ]] | ||
then | ||
|
||
# Action to save in another files the content of the file that contents the available packages | ||
find "$meoTmpDir/linux" -name "current-version-pkgs" -type f -exec \ | ||
cat {} \; | grep -A 2 "package" | awk '{ gsub(/^[[:space:]]*|,|--/, ""); print }' > $meoListAvailablePkgsPure | ||
|
||
# | ||
find "$meoTmpDir/linux" -name "current-version-pkgs" -type f -exec \ | ||
cat {} \; | grep -A 2 "package" | awk '{ gsub(/^[[:space:]]*|,|--/, ""); print }' | \ | ||
awk -F ": " 'length($0) > 3 && NF > 0 {printf "\033[1;036m%s\033[0m: \033[1;32m%s\033[0m\n", $1, $2}; \ | ||
length($0) < 3 && NF <= 0 {print}' > $meoListAvailablePkgs | ||
fi | ||
|
||
### Sequence for the deployment some useful files -> end tag[s0] | ||
|
||
|
||
|
||
# Remove the `tmp/..` directory | ||
if [[ -e "$getTmpCloneGit" ]] | ||
then | ||
# | ||
rm -fr "$getTmpCloneGit" 2> /dev/null | ||
fi | ||
|
||
# Remove `...meo..github/...` directory in /tmp | ||
if [[ -e "$meoTmpDir" ]] | ||
then | ||
rm -rf "$meoTmpDir" 2> /dev/null | ||
fi | ||
|
||
|
||
|
||
# Just to print the name of the author | ||
echo "" | ||
echo "" | ||
echo "~" | ||
|
||
tput setaf 6; tput bold; echo "By Baldé ~" `tput sgr0` 2> /dev/null |
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,16 @@ | ||
#!/usr/bin/bash | ||
|
||
##### | ||
# postrm script | ||
#### | ||
|
||
set -euo pipefail | ||
|
||
# Declaration variables | ||
meoListInstalledPkgsPure="/usr/lib/meo/library/info/list-installed-packages-pure" | ||
|
||
if [[ -e "$meoListInstalledPkgsPure" ]] | ||
then | ||
# | ||
sed -i "/meo/d" "$meoListInstalledPkgsPure" 2> /dev/null | ||
fi |
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,57 @@ | ||
#!/usr/bin/bash | ||
|
||
# | ||
set -uo pipefail | ||
|
||
|
||
##### | ||
# Action before deploying the program | ||
##### | ||
|
||
|
||
# Declaration variables | ||
# | ||
getOS="" | ||
|
||
meoListInstalledPkgsPure="/usr/lib/meo/library/info/list-installed-packages-pure" | ||
|
||
|
||
|
||
# | ||
if [[ -e "$meoListInstalledPkgsPure" ]] | ||
then | ||
# | ||
sed -i "/meo/d" "$meoListInstalledPkgsPure" 2> /dev/null | ||
fi | ||
|
||
|
||
|
||
### Action on the directory `/tmp` and ... -> start tag[0] | ||
if [[ ! ( -e "/tmp" ) ]] | ||
then | ||
|
||
mkdir -p /tmp 2> /dev/null | ||
chmod 777 /tmp 2> /dev/null | ||
|
||
# Check the return value of the last command <<mkdir>> | ||
if [[ $? -ne 0 ]] | ||
then | ||
echo "~" | ||
echo "This program is not compatible with your system ." | ||
exit 1 | ||
fi | ||
|
||
# Get kernel | ||
getOS=` uname --operating-system ` | ||
|
||
# | ||
if [[ $getOS != "GNU/Linux" ]] | ||
then | ||
echo "~" | ||
echo "This program is not compatible with your system ." | ||
exit 1 | ||
fi | ||
|
||
fi | ||
|
||
### Action on the directory `/tmp` and ... -> end tag[0] |
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,16 @@ | ||
#!/usr/bin/bash | ||
|
||
##### | ||
# prerm script | ||
#### | ||
|
||
set -euo pipefail | ||
|
||
# Declaration variables | ||
meoListInstalledPkgsPure="/usr/lib/meo/library/info/list-installed-packages-pure" | ||
|
||
if [[ -e "$meoListInstalledPkgsPure" ]] | ||
then | ||
# | ||
sed -i "/meo/d" "$meoListInstalledPkgsPure" 2> /dev/null | ||
fi |
Oops, something went wrong.