Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Update version mod
Browse files Browse the repository at this point in the history
  • Loading branch information
langonginc committed May 25, 2020
1 parent 8b90719 commit 5ec3ee1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Binary file modified LanGong
Binary file not shown.
4 changes: 4 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ int main(int argc, char* argv[])
system("echo ' Log:'&&echo&&cat ~/.config/LanFilePackage.log");
return 0;
}
else if(strcmp(type,"version")==0){
system("bash version.sh");
return 0;
}
else if(strcmp(type,"search")==0){
system("echo 'We found these Packages:' && curl https://langong-dev.github.io/Package/repos");
system("echo -n 'Search Packages at ' >> ~/.config/LanFilePackage.log && date -u >> ~/.config/LanFilePackage.log");
Expand Down
38 changes: 38 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

gettag(){
curl https://api.github.com/repos/langong-dev/LanFilePackage/releases/latest > val
cat val | jq '.tag_name' > tag
cat val | jq '.target_commitish' > mas
read tag < tag
read mas < mas
rm -f tag
rm -f mas
rm -f val
tag=${tag//\"/}
mas=${mas//\"/}
}

echo " Getting Info..."
echo
gettag

echo
echo Thanks for use LanGong-LanFilePackage.
echo
echo ----------
echo
echo "Name: LanFilePackage"
echo "Version: $tag"
echo "Full: LanFilePackage@$tag"
echo "Author: LanGongDEV"
echo "Branch: $mas"
echo "License: MIT-License"
echo "GitRepo: github.com:langong-dev/LanFilePackage.git"
echo "GitSSH: git@github.com:langong-dev/LanFilePackage.git"
echo
echo ----------
echo
echo "Made by LanGong 2020"
echo "Copyright (c) 2020 LanGong"
echo

0 comments on commit 5ec3ee1

Please sign in to comment.