code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
# START-COMMIT HOOK
#
# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered... | Shell |
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (t... | Shell |
#!/bin/sh
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the pat... | Shell |
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this rep... | Shell |
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (t... | Shell |
#!/bin/sh
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following or... | Shell |
#!/bin/sh
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the pat... | Shell |
#!/bin/sh
# POST-REVPROP-CHANGE HOOK
#
# The post-revprop-change hook is invoked after a revision property
# has been added, modified or deleted. Subversion runs this hook by
# invoking a program (script, executable, binary, etc.) named
# 'post-revprop-change' (for which this file is a template), with the
# f... | Shell |
#!/bin/sh
# POST-LOCK HOOK
#
# The post-lock hook is run after a path is locked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-lock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repos... | Shell |
#!/bin/sh
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH ... | Shell |
#!/bin/sh
# START-COMMIT HOOK
#
# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered... | Shell |
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this rep... | Shell |
#!/bin/sh
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this... | Shell |
#!/bin/sh
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this... | Shell |
#!/bin/sh
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following or... | Shell |
#!/bin/sh
# POST-LOCK HOOK
#
# The post-lock hook is run after a path is locked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-lock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repos... | Shell |
#!/bin/sh
# POST-REVPROP-CHANGE HOOK
#
# The post-revprop-change hook is invoked after a revision property
# has been added, modified or deleted. Subversion runs this hook by
# invoking a program (script, executable, binary, etc.) named
# 'post-revprop-change' (for which this file is a template), with the
# f... | Shell |
#!/bin/sh
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH ... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
./kill_process.sh
$ADB shell rm -r /data/data/com.google.android.apps.iosched/* | Shell |
#!/bin/sh
adb shell cat /data/data/com.google.android.apps.iosched/shared_prefs/com.google.android.apps.iosched_preferences.xml | xmllint --format - | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell am start \
-a android.intent.action.MAIN \
-c android.intent.category.LAUNCHER \
-n com.google.android.apps.iosched/.ui.HomeActivity
| Shell |
#!/bin/sh
adb shell pm clear com.google.android.apps.iosched | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell am force-stop com.google.android.apps.iosched
| Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
MAC_UNAME="Darwin"
if [[ "`uname`" == ${MAC_UNAME} ]]; then
DATE_FORMAT="%Y-%m-%dT%H:%M:%S"
else
DATE_FORMAT="%Y-%m-%d %H:%M:%S"
fi
if [ -z "$1" ]; then
NOW_DATE=$(date "+${DATE_FORMAT}")
echo Please provide a mock time in the format \"${NOW_DATE}\" or \"d\" to del... | Shell |
#!/bin/sh
# Remember VERBOSE only works on debug builds of the app
adb shell setprop log.tag.iosched_SyncHelper VERBOSE
adb shell setprop log.tag.iosched_SessionsHandler VERBOSE
adb shell setprop log.tag.iosched_ImageCache VERBOSE
adb shell setprop log.tag.iosched_ImageWorker VERBOSE
adb shell setprop log.tag.iosched_I... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell "echo '$*' | sqlite3 -header -column /data/data/com.google.android.apps.iosched/databases/schedule.db" | Shell |
#!/bin/sh
# Sessions list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/sessions
# Vendors list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/vendors
# Session detail
#adb shell am start -a... | Shell |
# Generated from ltmain.m4sh.
# ltmain.sh (GNU libtool) 2.2.6b
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# ... | Shell |
#!/bin/sh
#
# install - install a program, script, or datafile
#
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, t... | Shell |
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of th... | Shell |
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without ... | Shell |
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribu... | Shell |
#!/bin/sh
# see http://projects.unbit.it/uwsgi and http://projects.unbit.it/uwsgi/wiki/Gevent
exec uwsgi --loop gevent --http-socket :8000 --module application --async 1000
| Shell |
python memtest.py &
PID=$!
watch -n 1 ./memmonitor.py $PID
kill -15 $PID
| Shell |
#!/bin/sh
#
# Usage example: ./generate.sh int Int Integer"
# Args are: primitive type, capitalized primitive type, wrapper type
#
# To make changes to the .java files in this package,
# 1. run this script to generate the templates, move the .gen files
# somewhere else
# 2. modify the template with your intended cha... | Shell |
#!/bin/bash
#
# This script checks the java version and bails if it's less
# than Java6 (because we use @Override annotations on interface
# overriding methods. It then proceeds to do a maven build that
# first cleans, then builds the normal lifecycle through compilation
# unit testing (if available) up to packaging. ... | Shell |
#!/bin/bash
#
set -uex
curl 'http://localhost:8081/list-games'
| Shell |
#!/bin/bash
#
set -ue
set -x
curl -H "Content-Type: application/json" "http://localhost:12345/ping"
| Shell |
#!/bin/bash
#
set -ue
backend=""
# match dev_appserver oauth2 default user_id
userID="0"
while [ $# -ge 1 ]
do
arg="$1"
shift
if [ "$arg" == "-b" ]
then
backend=1
else
userID="$arg"
fi
done
if [ "$backend" ]
then
# matcher backend
set -x
curl --data-binary "{}" -H "Content-Type: applicatio... | Shell |
#!/bin/bash
#
set -uex
dev_appserver.py \
--host 0.0.0.0 \
--skip_sdk_update_check yes \
. $*
| Shell |
#!/bin/bash
#
set -uex
curl 'http://localhost:8081/debug'
| Shell |
#!/bin/bash
#
set -uex
curl 'http://localhost:8081/start-game'
| Shell |
#!/bin/bash
#
set -ue
set -x
curl -H "Content-Type: application/json" "http://localhost:12345/log"
| Shell |
#!/bin/bash
#
set -ue
# make sure stuff is installed
[ ! -d 'node_modules' ] && npm install socket.io express
set -x
# run the game
node games-server/main.js $*
| Shell |
#!/bin/bash
#
set -ue
pairing_key=$( cat shared/pairing-key.json | sed -e 's/{"key": "//' -e 's/".*//' )
set -x
data='{ "userID": 823478923748932, "displayName": "fredsa", "game_name": "syXv", "player_game_key": "283473289478329" }'
curl --data-binary "$data" -H "Content-Type: application/json" "http://localhost:1234... | Shell |
cd /cygdrive/c/workspace/AndEnginePhysicsBox2DExtension/
/cygdrive/c/workspace/sdk/android-ndk-r6/ndk-build | Shell |
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The A... | Shell |
#!/bin/bash
# -----------------------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The A... | Shell |
#!/bin/sh
# rm pdf/*.pdf
ls
for fn in ../svg/pages/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=../../../generated/pdf/pages/$pdf.pdf $fn
done | Shell |
#!/bin/sh
rm pdf/*.pdf
for fn in svg/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=pdf/$pdf.pdf $fn
done
cd java
ant
| Shell |
#!/bin/sh
# rm pdf/*.pdf
ls
for fn in ../svg/pages/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=../../../generated/pdf/pages/$pdf.pdf $fn
done | Shell |
#!/bin/sh
rm pdf/*.pdf
for fn in svg/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=pdf/$pdf.pdf $fn
done
cd java
ant
| Shell |
#!/bin/sh
# rm pdf/*.pdf
ls
for fn in ../svg/pages/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=../../../generated/pdf/pages/$pdf.pdf $fn
done | Shell |
#!/bin/sh
# rm pdf/*.pdf
ls
for fn in ../svg/pages/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=../../../generated/pdf/pages/$pdf.pdf $fn
done | Shell |
rm pdf/*.pdf
for fn in svg/*.svg; do
pdf=`basename "$fn" ".svg"`
echo $pdf
inkscape --export-pdf=pdf/$pdf.pdf $fn
done
cd java
ant
| Shell |
#! /bin/sh
# Convert templates into Makefile and config.c, based on the module
# definitions found in the file Setup.
#
# Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
#
# Options:
# -s directory: alternative source directory (default .)
# -l directory: library source directory (default de... | Shell |
#!/bin/sh
#
# ========================================================================
# FILE: ld_so_aix
# TYPE: executable, uses makexp_aix
# SYSTEM: AIX
#
# DESCRIPTION: Creates a shareable .o from a set of pre-compiled
# (unshared) .o files
#
# USAGE: ... | Shell |
#! /bin/sh
#
# linkmodule for Python
# Chris Herborth (chrish@qnx.com)
#
# This is covered by the same copyright/licensing terms as the rest of
# Python.
#
# Shell script to build shared library versions of the modules; since
# the change to the *ahem* "proper" import/export mechanism, this script
# is much simpler. I... | Shell |
#!/bin/sh
#
# ===========================================================================
# FILE: makexp_aix
# TYPE: standalone executable
# SYSTEM: AIX 3.2.5 and AIX 4
#
# DESCRIPTION: This script creates an export list of ALL global symbols
# from a list of object or archive files.
#
# ... | Shell |
#!/bin/sh
#
# Truly fake ar, using a directory to store object files.
#
# Donn Cave, donn@oz.net
usage='Usage: ar-fake cr libpython.dir obj.o ...
ar-fake d libpython.dir obj.o ...
ar-fake so libpython.dir libpython.so'
case $# in
0|1|2)
echo "$usage" >&2
exit 1
;;
esac
comm... | Shell |
#!/bin/sh
#
# ===========================================================================
# FILE: makexp_aix
# TYPE: standalone executable
# SYSTEM: AIX 3.2.5 and AIX 4
#
# DESCRIPTION: This script creates an export list of ALL global symbols
# from a list of object or archive files.
#
# ... | Shell |
#!/bin/sh
#
# ========================================================================
# FILE: ld_so_aix
# TYPE: executable, uses makexp_aix
# SYSTEM: AIX
#
# DESCRIPTION: Creates a shareable .o from a set of pre-compiled
# (unshared) .o files
#
# USAGE: ... | Shell |
#! /bin/sh
#
# linkmodule for Python
# Chris Herborth (chrish@qnx.com)
#
# This is covered by the same copyright/licensing terms as the rest of
# Python.
#
# Shell script to build shared library versions of the modules; since
# the change to the *ahem* "proper" import/export mechanism, this script
# is much simpler. I... | Shell |
#!/bin/sh
# configure script for zlib. This script is needed only if
# you wish to build a shared library and your system supports them,
# of if you need special compiler, flags or install directory.
# Otherwise, you can just use directly "make test; make install"
#
# To create a shared library, use "configure --shared... | Shell |
#! /bin/sh
# Convert templates into Makefile and config.c, based on the module
# definitions found in the file Setup.
#
# Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
#
# Options:
# -s directory: alternative source directory (default .)
# -l directory: library source directory (default de... | Shell |
#!/bin/sh
#
# Truly fake ar, using a directory to store object files.
#
# Donn Cave, donn@oz.net
usage='Usage: ar-fake cr libpython.dir obj.o ...
ar-fake d libpython.dir obj.o ...
ar-fake so libpython.dir libpython.so'
case $# in
0|1|2)
echo "$usage" >&2
exit 1
;;
esac
comm... | Shell |
#!/bin/bash
#
# This script checks the java version and bails if it's less
# than Java6 (because we use @Override annotations on interface
# overriding methods. It then proceeds to do a maven build that
# first cleans, then builds the normal lifecycle through compilation
# unit testing (if available) up to packaging. ... | Shell |
#!/bin/bash
if [ $# != 1 ]
then
echo "Usage: $0 emailAddress"
exit 1
fi
read -s -p "Password: " mypassword
echo ""
curl https://www.google.com/accounts/ClientLogin -d Email=$1 -d "Passwd=$mypassword" -d accountType=GOOGLE -d source=Google-cURL-Example -d service=ac2dm
| Shell |
#!/bin/sh
# Create a backup tar gzip file of the cwd with the date appended
# located in the parent directory.
FILENAME=../`pwd|xargs basename`-`date -j "+%Y-%m-%d"`.tgz
echo Will create $FILENAME
tar cfz $FILENAME .
echo Done.
| Shell |
#!/bin/sh
#
# Usage example: ./generate.sh int Int Integer"
# Args are: primitive type, capitalized primitive type, wrapper type
#
# To make changes to the .java files in this package,
# 1. run this script to generate the templates, move the .gen files
# somewhere else
# 2. modify the template with your intended cha... | Shell |
#!/bin/bash
#
# This script checks the java version and bails if it's less
# than Java6 (because we use @Override annotations on interface
# overriding methods. It then proceeds to do a maven build that
# first cleans, then builds the normal lifecycle through compilation
# unit testing (if available) up to packaging. ... | Shell |
#!/bin/bash
if [ $# != 1 ]
then
echo "Usage: $0 emailAddress"
exit 1
fi
read -s -p "Password: " mypassword
echo ""
curl https://www.google.com/accounts/ClientLogin -d Email=$1 -d "Passwd=$mypassword" -d accountType=GOOGLE -d source=Google-cURL-Example -d service=ac2dm
| Shell |
#!/bin/sh
# Create a backup tar gzip file of the cwd with the date appended
# located in the parent directory.
FILENAME=../`pwd|xargs basename`-`date -j "+%Y-%m-%d"`.tgz
echo Will create $FILENAME
tar cfz $FILENAME .
echo Done.
| Shell |
#!/bin/sh
#
if [ $# -ne 1 ]
then
echo "version !!!"
exit 1
fi
FILELIST="runzdclient zdclient install Readme.txt"
ARCH=`uname -m`
VER=$1
TARFILE=zdclient_bin_$VER\_$ARCH.tar.gz
make clean
make
tar cvfz $TARFILE $FILELIST
echo "Pack Done---> $TARFILE"
| Shell |
#!/bin/bash
#用户名
USERNAME='user'
#密码
PASSWORD='pass'
#其他参数(如--dev指定网卡,可运行zdclient -h查看详细参数)
ARGS='--dhcp'
#---------------------------------------------------------------------
LOGFILE=/tmp/zdclient.log
echo Beginning Authentication...
zdclient -u "$USERNAME" -p "$PASSWORD" -b "$@" 2>&1|tee -i "$LOGFILE"
#cat zrj.... | Shell |
#!/bin/bash
#用户名
USERNAME='user'
#密码
PASSWORD='pass'
#其他参数(如--dev指定网卡,可运行zdclient -h查看详细参数)
ARGS='--dhcp'
#---------------------------------------------------------------------
LOGFILE=/tmp/zdclient.log
echo Beginning Authentication...
zdclient -u "$USERNAME" -p "$PASSWORD" -b "$@" 2>&1|tee -i "$LOGFILE"
#cat zrj.... | Shell |
#!/bin/bash
INSTALL_PATH=/usr/bin
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT to run install."
exit 1
fi
if [ $# -eq 1 ]
then
INSTALL_PATH=$1
fi
if [[ -e 'zdclient' && -e 'runzdclient' ]]
then
echo $'\n#### Files intalling to '$INSTALL_PATH$' ####\n'
install -v -m 4755 -o root zdclient $INSTA... | Shell |
#!/bin/sh
#
if [ $# -ne 1 ]
then
echo "version !!!"
exit 1
fi
FILELIST="runzdclient zdclient install Readme.txt"
ARCH=`uname -m`
VER=$1
TARFILE=zdclient_bin_$VER\_$ARCH.tar.gz
make clean
make
tar cvfz $TARFILE $FILELIST
echo "Pack Done---> $TARFILE"
| Shell |
#!/bin/bash
INSTALL_PATH=/usr/bin
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT to run install."
exit 1
fi
if [ $# -eq 1 ]
then
INSTALL_PATH=$1
fi
if [[ -e 'zdclient' && -e 'runzdclient' ]]
then
echo $'\n#### Files intalling to '$INSTALL_PATH$' ####\n'
install -v -m 4755 -o root zdclient $INSTA... | Shell |
#!/bin/bash
#检测root权限
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
#开始认证,DHCP模式,后台运行
./zdclient -u username -p password -b --dhcp
#如果认证成功,执行dhclient更新系统ip
if [ $? -eq 0 ]
then
dhclient
fi
exit 0
| Shell |
#!/bin/sh
#
# Usage:
# ./release-sh [版本号] [硬件架构]
# 检查从命令行指定的版本号参数
if [ -n "$1" ] ; then
VERSION=$1
else
VERSION=`date '+%Y%m%d'`
fi
# 检查目标机硬件架构
if [ -n "$2" ] ; then
ARCH=$2
else
ARCH=`uname --machine` # 未指定硬件架构时,自动为本机进行编译
fi
CC=cc
case $ARCH in
i[3-6]86 ) # 32位PC机
CFLAGS="-march=$ARCH"
break
;;
x... | Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
./zdclient -u username -p password -b
exit 0
| Shell |
#!/bin/bash
#检测root权限
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
#开始认证,DHCP模式,后台运行
./zdclient -u username -p password -b --dhcp
#如果认证成功,执行dhclient更新系统ip
if [ $? -eq 0 ]
then
dhclient
fi
exit 0
| Shell |
#!/bin/sh
#
# Usage:
# ./release-sh [版本号] [硬件架构]
# 检查从命令行指定的版本号参数
if [ -n "$1" ] ; then
VERSION=$1
else
VERSION=`date '+%Y%m%d'`
fi
# 检查目标机硬件架构
if [ -n "$2" ] ; then
ARCH=$2
else
ARCH=`uname --machine` # 未指定硬件架构时,自动为本机进行编译
fi
CC=cc
case $ARCH in
i[3-6]86 ) # 32位PC机
CFLAGS="-march=$ARCH"
break
;;
x... | Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
./zdclient -u username -p password -b
exit 0
| Shell |
#!/bin/bash
#检测root权限
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
#开始认证,DHCP模式,后台运行
./zdclient -u username -p password -b --dhcp
#如果认证成功,执行dhclient更新系统ip
if [ $? -eq 0 ]
then
dhclient
fi
exit 0
| Shell |
#!/bin/sh
#
# Usage:
# ./release-sh [版本号] [硬件架构]
# 检查从命令行指定的版本号参数
if [ -n "$1" ] ; then
VERSION=$1
else
VERSION=`date '+%Y%m%d'`
fi
# 检查目标机硬件架构
if [ -n "$2" ] ; then
ARCH=$2
else
ARCH=`uname --machine` # 未指定硬件架构时,自动为本机进行编译
fi
CC=cc
case $ARCH in
i[3-6]86 ) # 32位PC机
CFLAGS="-march=$ARCH"
break
;;
x... | Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
./zdclient -u username -p password -b
exit 0
| Shell |
#!/bin/bash
#检测root权限
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
#开始认证,DHCP模式,后台运行
./zdclient -u username -p password -b --dhcp
#如果认证成功,执行dhclient更新系统ip
if [ $? -eq 0 ]
then
dhclient
fi
exit 0
| Shell |
#!/bin/sh
#
# Usage:
# ./release-sh [版本号] [硬件架构]
# 检查从命令行指定的版本号参数
if [ -n "$1" ] ; then
VERSION=$1
else
VERSION=`date '+%Y%m%d'`
fi
# 检查目标机硬件架构
if [ -n "$2" ] ; then
ARCH=$2
else
ARCH=`uname --machine` # 未指定硬件架构时,自动为本机进行编译
fi
CC=cc
case $ARCH in
i[3-6]86 ) # 32位PC机
CFLAGS="-march=$ARCH"
break
;;
x... | Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
./zdclient -u username -p password -b
exit 0
| Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
zdclient -u username -p password -g gateway -d dns >~/.file &
exit 0
| Shell |
#!/bin/sh
#
if [ $# -ne 1 ]
then
echo "version !!!"
exit 1
fi
FILELIST="runzdclient zdclient install Readme.txt"
ARCH=`uname -m`
VER=$1
TARFILE=zdclient_bin_$VER\_$ARCH.tar.gz
make clean
make
tar cvfz $TARFILE $FILELIST
echo "Pack Done---> $TARFILE"
| Shell |
#!/bin/bash
#用户名
USERNAME='user'
#密码
PASSWORD='pass'
#其他参数(如--dev指定网卡,可运行zdclient -h查看详细参数)
ARGS=(--dhcp -b)
#---------------------------------------------------------------------
LOGFILE=/tmp/zdclient.log
echo Beginning Authentication...
zdclient $@ ${ARGS[@]} -u $USERNAME -p $PASSWORD 2>&1|tee -i "$LOGFILE"
pro... | Shell |
#!/bin/bash
#用户名
USERNAME='user'
#密码
PASSWORD='pass'
#其他参数(如--dev指定网卡,可运行zdclient -h查看详细参数)
ARGS=(--dhcp -b)
#---------------------------------------------------------------------
LOGFILE=/tmp/zdclient.log
echo Beginning Authentication...
zdclient $@ ${ARGS[@]} -u $USERNAME -p $PASSWORD 2>&1|tee -i "$LOGFILE"
pro... | Shell |
#!/bin/bash
INSTALL_PATH=/usr/bin
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT to run install."
exit 1
fi
if [ $# -eq 1 ]
then
INSTALL_PATH=$1
fi
if [[ -e 'zdclient' && -e 'runzdclient' ]]
then
echo $'\n#### Files intalling to '$INSTALL_PATH$' ####\n'
install -v -m 4755 -o root zdclient $INSTA... | Shell |
#!/bin/sh
#
if [ $# -ne 1 ]
then
echo "version !!!"
exit 1
fi
FILELIST="runzdclient zdclient install Readme.txt"
ARCH=`uname -m`
VER=$1
TARFILE=zdclient_bin_$VER\_$ARCH.tar.gz
make clean
make
tar cvfz $TARFILE $FILELIST
echo "Pack Done---> $TARFILE"
| Shell |
#!/bin/bash
INSTALL_PATH=/usr/bin
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT to run install."
exit 1
fi
if [ $# -eq 1 ]
then
INSTALL_PATH=$1
fi
if [[ -e 'zdclient' && -e 'runzdclient' ]]
then
echo $'\n#### Files intalling to '$INSTALL_PATH$' ####\n'
install -v -m 4755 -o root zdclient $INSTA... | Shell |
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "Need to be ROOT."
exit 1
fi
zdclient -u username -p password -g gateway -d dns >~/.file &
exit 0
| Shell |
#!/bin/sh
#
if [ $# -ne 1 ]
then
echo "version !!!"
exit 1
fi
FILELIST="runzdclient zdclient install Readme.txt"
ARCH=`uname -m`
VER=$1
TARFILE=zdclient_bin_$VER\_$ARCH.tar.gz
make clean
make
tar cvfz $TARFILE $FILELIST
echo "Pack Done---> $TARFILE"
| Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.