浏览代码

Preamble actually isn't needed

variables come from the calling script
Bob Mottram 8 年前
父节点
当前提交
bfa480ef13
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 0 次插入43 次删除
  1. 0
    43
      src/freedombone-utils-git

+ 0
- 43
src/freedombone-utils-git 查看文件

28
 # You should have received a copy of the GNU Affero General Public License
28
 # You should have received a copy of the GNU Affero General Public License
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-NO_OF_ARGS=$#
32
-
33
-PROJECT_NAME='freedombone'
34
-
35
-export TEXTDOMAIN=$PROJECT_NAME-utils-git
36
-export TEXTDOMAINDIR="/usr/share/locale"
37
-
38
-# An optional configuration file which overrides some of these variables
39
-CONFIGURATION_FILE="${PROJECT_NAME}.cfg"
40
-
41
-if [ -f ~/${PROJECT_NAME}.cfg ]; then
42
-	CONFIGURATION_FILE=~/${PROJECT_NAME}.cfg
43
-fi
44
-
45
-# friends repo mirrors
46
-FRIENDS_MIRRORS_SERVER=
47
-FRIENDS_MIRRORS_PASSWORD=
48
-FRIENDS_MIRRORS_SSH_PORT=
49
-
50
-function get_friends_servers {
51
-	if [ -f $CONFIGURATION_FILE ]; then
52
-		if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
53
-			FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
54
-		fi
55
-		if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
56
-			FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
57
-		fi
58
-		if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
59
-			FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
60
-		fi
61
-	fi
62
-
63
-	if [ ! $FRIENDS_MIRRORS_SERVER ]; then
64
-		echo "1"
65
-		return
66
-	fi
67
-	if [ ${#FRIENDS_MIRRORS_SERVER} -lt 2 ]; then
68
-		echo "1"
69
-		return
70
-	fi
71
-	echo "0"
72
-}
73
-
74
 function git_clone {
31
 function git_clone {
75
 	repo_url="$1"
32
 	repo_url="$1"
76
 	destination_dir="$2"
33
 	destination_dir="$2"