1
0

更新打包脚本

This commit is contained in:
Sense T 2025-03-01 10:35:26 +08:00
parent 1cc5ff724f
commit de60d7081a
2 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
.direnv .direnv
test test
result

View File

@ -73,21 +73,21 @@ stdenv.mkDerivation rec {
# 安装应用文件 # 安装应用文件
mkdir -p $out${install_dir} mkdir -p $out${install_dir}
for i in $(ls -a $src); do for i in $(ls $src); do
if [ $i == "$src/clientfiles" ]; then if [ $i == "$src/clientfiles" ]; then
continue continue
fi fi
cp -r $i $out${install_dir} cp -rv $i $out${install_dir}
done done
cp -rv $src/.iNode $out${install_dir}
for i in $(ls $out${install_dir}/*.ps); do sed -i 's|#!/bin/sh|#!/usr/bin/env sh|' $out${install_dir}/renew.ps
sed -i 's|#!/bin/sh|#!/usr/bin/env sh|' $i chmod +x $out${install_dir}/renew.ps
chmod +x $i
done
# 禁用 enablecards.ps (清空文件内容) # 禁用 enablecards.ps (清空文件内容)
head -n1 $out${install_dir}/enablecards.ps | tee $out${install_dir}/enablecards.ps sed 's|#!/bin/sh|#!/usr/bin/env sh|' $out${install_dir}/enablecards.ps | head -n 1 | tee $out${install_dir}/enablecards.ps
chmod +x $out${install_dir}/enablecards.ps
# 客户端配置目录 # 客户端配置目录
rm -rf $out${install_dir}/clientfiles rm -rf $out${install_dir}/clientfiles