开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 1

eming/shellinabox

forked from smartavs/shellinabox
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
标签 (11)
master
v2.20
v2.19
v2.18
v2.17
v2.16
v2.15
v2.15-rc2
v2.14
v2.13
v2.12
v2.11
master
分支 (1)
标签 (11)
master
v2.20
v2.19
v2.18
v2.17
v2.16
v2.15
v2.15-rc2
v2.14
v2.13
v2.12
v2.11
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
标签 (11)
master
v2.20
v2.19
v2.18
v2.17
v2.16
v2.15
v2.15-rc2
v2.14
v2.13
v2.12
v2.11
shellinabox
/
commit
shellinabox
/
commit
commit 7.60 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash -e
echo "This script would only work on a Subversion repository"
echo "and is only kept for historical purpose... for now."
exit 1
# The script ensures that all commands succeed unless an error occurred. If it
# does though, the shell terminates the script and our exit handler runs.
trap 'tput bel || :; echo Failed! >&2' EXIT
# Ask the user a yes/no question. This function does not require the user to
# press ENTER after making a selection.
yes_no() {
local c
while :; do
c="$(set +e
trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT
stty -echo iuclc -icanon 2>/dev/null
dd count=1 bs=1 2>/dev/null | od -An -tx1)"
case "$c" in
" 0a") if [ -n "1ドル" ]; then
[ 1ドル -eq 0 ] && echo "Y" || echo "N"
return 1ドル
fi
;;
" 79") echo "Y"
return 0
;;
" 6e") echo "N"
return 1
;;
"") echo "Aborted" >&2
exit 1
;;
*) # The user pressed an unrecognized key. As we are not echoing
# any incorrect user input, alert the user by ringing the bell.
(tput bel) 2>/dev/null || :
;;
esac
done
}
# Build Debian package and create all the files that are needed by the
# distribution maintainer.
debian_package() {
set -e
(
# Try to build the package. If things fail, let the exit handler remove all
# temporary files.
trap 'rm -rf "${prj}-${ver}" "${prj}_${ver}"*' EXIT
# Clean up any old temporary files
rm -rf "${prj}-${ver}" "${prj}_${ver}"*
# Extract the distribution source archive
tar zfx "${prj}-${ver}.tar.gz"
# We want to ship the "debian" directory with the source archive that
# users download directly from the project web site. This allows them to
# easily build their own Debian package by following the instructions in
# INSTALL.Debian.
# But when preparing our package for direct integration with Debian-based
# distributions, we have to instead remove the "debian" directory, as the
# distribution prefers that third-party projects are not built "natively".
mv "${prj}-${ver}/debian" "${prj}_${ver}_debian"
tar zfc "${prj}_${ver}.orig.tar.gz" "${prj}-${ver}"
mv "${prj}_${ver}_debian" "${prj}-${ver}/debian"
# Reset compatibility level
echo 7 >"${prj}-${ver}/debian/compat"
sed -i -e 's/debhelper *([^0-9]*[^)]*)/debhelper (>= 7.0.0)/' \
"${prj}-${ver}/debian/control"
sed -i -e 's/dh_clean *-k/dh_prep/' "${prj}-${ver}/debian/rules"
# Check that the version number in the debian/changelog file matches
if [ "$(sed -e 's/^'"${prj}"' *(\([^-]*\)-.*).*/1円/;t1;d;:1;q' \
"${prj}-${ver}/debian/changelog")" != "${ver}" ]; then
echo "Debian changelog file does not match current version number!" >&2
exit 1
fi
# Build Debian packages.
(cd "${prj}-${ver}"
fakeroot dpkg-buildpackage -sa -us -uc || :)
trap '' EXIT
# Run lintian
lintian --verbose -I ${prj}_${ver}*_*.changes
) || exit 1
# Revert any changes that might be pending in distributions/debian/*
local revert="$(svn st |
grep distributions/debian |
grep '^[^?]' |
awk '{ print 2ドル }' |
tac)"
if [ -n "${revert}" ]; then
svn revert ${revert}
rm -f ${revert}
fi
# Create distributions/debian if it does not exist yet.
mkdir -p distributions/debian
for i in distributions distributions/debian; do
if [ -z "$(svn st "${i}" 2>/dev/null | grep -v '^[?]')" ]; then
svn add --depth=empty "${i}"
fi
done
# If this version of files already exists in the distribution directory,
# we are not yet ready to cut a new release. Just clean up and exit.
for i in "${prj}_${ver}"[-.]*.*; do
[ -r "distributions/debian/${i}" ] && {
rm $(ls "${prj}_${ver}"[-.]* | egrep -v '_*.changes|_*.deb')
return 0
}
done
# Move new Debian files into release area.
mv $(ls "${prj}_${ver}"[-.]* | egrep -v '_*.changes|_*.deb') \
distributions/debian/
svn add distributions/debian/"${prj}_${ver}"[-.]*.*
# Let the caller know that we added new packages.
return 1
}
# Quick sanity check that we are running from the correct directory
test -r configure.ac
# Make sure there are no stale files
svn update
# Determine Subversion revision number, project name, and public version
# number
{
rev=$(($(svn info | sed -e 's/^Revision: \(.*\)/1円/;t1;d;:1;q')+1))
prj="$(sed -e 's/^AC_INIT(\([^,]*\),.*/1円/;t1;d;:1;q' configure.ac)"
ver="$(sed -e 's/^AC_INIT([^,]*, *\([^,]*\),.*/1円/;t1;d;:1;q' configure.ac)"
} 2>/dev/null
# Update "configure.ac" with the next Subversion revision number. This
# information will trickle down into various source files where it becomes
# part of the user-visible version information.
sed -i -e 's/^\(VCS_REVISION=\).*/1円'"${rev}"'/' configure.ac
touch shellinabox/vt100.jspp shellinabox/shell_in_a_box.jspp
# If the manual page has been changed, make sure that the time stamp will be
# changed, too.
if [ -n "$(svn st shellinabox/shellinaboxd.man.in 2>/dev/null |
grep '^M')" ]; then
sed -i -e 's/^\([.]TH .*\)"[^"]*"/1円"'"$(date +'%b %d, %Y')"'"/
s/2008-2[01][0-9][0-9]/2008-'"$(date +'%Y')"'/g' \
shellinabox/shellinaboxd.man.in
fi
# Always update the year in the user visible copyright statement(s)
for i in shellinabox/shell_in_a_box.jspp \
shellinabox/vt100.jspp \
COPYING \
debian/copyright; do
sed -i -e 's/\(2[01][0-9][0-9]-\)2[01][0-9][0-9]/1円'"$(date +'%Y')"'/g' "$i"
done
# If a source file has changed, make sure to update the year in the copyright
# statement for that particular file.
svn st | egrep '^[MA]' | awk '{ print 2ドル }' |
egrep '^(shellinabox|libhttp|demo)/' |
egrep '[.](html|h|c|css|jspp)$' |
while read -r f; do
sed -i -e 's/\(2[01][0-9][0-9]-\)2[01][0-9][0-9]/1円'"$(date +'%Y')"'/g' "$f"
done
# For now, Ubuntu/Hardy is still quite popular. We want to make it easy for
# our users to build Debian packages from source. So, make sure we lock the
# compatibility level at 6. Once we no longer care about maintaining strict
# backwards compatibility, we can lift this restriction.
echo 6 >debian/compat
sed -i -e 's/debhelper *([^0-9]*[^)]*)/debhelper (>= 6.0.0)/' debian/control
sed -i -e 's/dh_prep/dh_clean *-k/' debian/rules
# Build all the sources, create the distribution tar archive, and run some
# basic sanity checks.
make all distcheck
# Build Debian package and create all the files that are needed by the
# distribution maintainer.
msg=
debian_package || {
msg="${msg}
NOTICE: New version released. Please do not forget to notify distributions"
if [ -r ~/.shellinabox-notifier ]; then
while read e; do
{
echo "This is an automatically generated e-mail notification that"
echo "a new release of ShellInABox has just been made available"
echo "on the project's website at http://shellinabox.com"
echo
echo "You had previously requested to be notified when this happens."
} | mail -s "New ShellInABox release" "$e"
done
else
msg="${msg}
NOTICE: Could not find ~/.shellinabox-notifier. Not sending e-mail..."
fi
}
svn diff $(svn st |
egrep -v ' configure$| aclocal.m4$|distributions|^[?]' |
sed -e 's/^[^ ]* *//') | less
echo -n 'Commit these changes (Y/n): '
yes_no 0 || exit 1
svn commit
echo "${msg}"
trap '' EXIT
exit 0
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

克隆https://github.com/shellinabox/shellinabox.git,请大家按照规定进行使用
暂无标签
GPL-2.0
使用 GPL-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/eming/shellinabox.git
git@gitee.com:eming/shellinabox.git
eming
shellinabox
shellinabox
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /