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

Commit

Permalink
PUSH-UP
Browse files Browse the repository at this point in the history
  • Loading branch information
langonginc committed Jun 19, 2020
1 parent 9954ccc commit 2527a6e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 21 deletions.
20 changes: 20 additions & 0 deletions color.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

msg(){
whiptail --title "$1" --msgbox "$2" 10 60
}

red(){
echo -e "\033[31m$1\033[0m"
}

yellow(){
echo -e "\033[33m$1\033[0m"
}

blue(){
echo -e "\033[34m$1\033[0m"
}



8 changes: 4 additions & 4 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash


. ~/LanFilePackage/color.sh

rac(){
name=$1
#newfile="LanGongFile/"$name
# cd ~/
# cd $newfile
echo "Sorry we cannot find the entrance of this Package."
red " >> Sorry we cannot find the entrance of this Package."
echo
touch in.index
ls
echo "Do you know how to enter in "$name" ? (menthod 方法 , this is a bash code ,这个是一个bash命令)"
blue " >> Do you know how to enter in "$name" ? (menthod 方法 , this is a bash code ,这个是一个bash命令)"
sleep 1
read entrance
echo "OK, Please wait!"
Expand All @@ -38,4 +38,4 @@ che(){
cd "LanGongFile/"
cd $name
test -f in.index || rac $name
}
}
13 changes: 7 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

. ./color.sh
git --version|| (echo "Please Install Git." && exit 1)
g++ --version|| (echo "Please Install GCC/G++." && exit 1)
bash --version || (echo "Please Install Bash." && exit 1)
Expand All @@ -8,15 +9,15 @@ wget --version || (echo "Please Install Wget." && exit 1)
echo
echo
echo
echo " >> Allow you to install!"
echo " >> Compile main program..."
blue " >> Allow you to install!"
blue " >> Compile main program..."
g++ main.cpp -o LanGong
echo
cd ~/
echo " >> Making DIR..."
blue " >> Making DIR..."
mkdir LanGongFile
cd LanGongFile
echo " >> Creating log..."
blue " >> Creating log..."
touch .lanrc
echo "fun(){
echo
Expand All @@ -29,13 +30,13 @@ echo "Made by LanGongINC," > ~/.config/LanFilePackage.log
echo -n "LanFilePackage is install at " >> ~/.config/LanFilePackage.log
date -u >> ~/.config/LanFilePackage.log

echo " >> Creat alias..."
blue " >> Creat alias..."
echo "cd ~/LanFilePackage && ./LanGong \$1 \$2 \$3 \$4 \$5" > ~/.lfpa
als="alias lfp=\"bash ~/.lfpa\""
echo $als >> ~/.zshrc
echo $als >> ~/.bashrc
echo $als >> ~/.fishrc

echo
echo " >> Install seccussfully."
blue " >> Install seccussfully."
exit 0
24 changes: 13 additions & 11 deletions version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

. ./color.sh

gettag(){
curl https://api.github.com/repos/langong-dev/LanFilePackage/releases/latest > val
cat val | jq '.tag_name' > tag
Expand All @@ -17,26 +19,26 @@ gettag(){
tag="NetWork Error"
mas=$tag

echo " Getting Info..."
blue " Getting Info..."
echo
gettag

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

0 comments on commit 2527a6e

Please sign in to comment.