Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
rename *.pp to *.uppconf
Browse files Browse the repository at this point in the history
  • Loading branch information
rojenzaman committed May 22, 2023
1 parent ad3d5c7 commit 6ef036f
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ clean-all: clean
rm -rf lib/objs

format-pp:
nginxbeautifier src/loop/*.pp src/settings/*.pp
nginxbeautifier src/loop/*.uppconf src/settings/*.uppconf

format-sh:
beautysh --tab lib/*.sh bin/*.sh
Expand Down
16 changes: 8 additions & 8 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ while IFS= read -r line; do
export ROBOTS=$(echo ${line} | awk '{print $4}')
FORMAT=$(echo ${line} | awk '{print $3}')
if [[ ${FORMAT} == "service" ]]; then
pp src/loop/service.pp >> output/service.conf
pp src/loop/service.uppconf >> output/service.conf
fi
done < etc/tmp/rules.txt && echo "src/loop/service.pp >> output/service.conf"
done < etc/tmp/rules.txt && echo "src/loop/service.uppconf >> output/service.conf"

while IFS= read -r line; do
export PROXY=$(echo ${line} | awk '{print $2}')
Expand All @@ -21,17 +21,17 @@ while IFS= read -r line; do
export FRAME=$(echo ${line} | awk '{print $5}')
FORMAT=$(echo ${line} | awk '{print $3}')
if [[ ${FORMAT} == "main" ]]; then
pp src/loop/main.pp >> output/main.conf
pp src/loop/main.uppconf >> output/main.conf
fi
done < etc/tmp/rules.txt && echo "src/loop/main.pp >> output/main.conf"
done < etc/tmp/rules.txt && echo "src/loop/main.uppconf >> output/main.conf"

for proxy_domain in $(cat etc/tmp/rules.txt | awk '{print $2}'); do
export proxy_domain="${proxy_domain}"
pp src/loop/http.pp >> output/http.conf
done && echo "src/loop/http.pp >> output/http.conf"
pp src/loop/http.uppconf >> output/http.conf
done && echo "src/loop/http.uppconf >> output/http.conf"

for pp_file in $(find src/ -path 'src/loop' -prune -o -name "*.pp" -print); do
pp "${pp_file}" > "output/$(basename "${pp_file%.pp}.conf")" && echo "${pp_file}" " >> " "output/$(basename "${pp_file%.pp}.conf")"
for pp_file in $(find src/ -path 'src/loop' -prune -o -name "*.uppconf" -print); do
pp "${pp_file}" > "output/$(basename "${pp_file%.uppconf}.conf")" && echo "${pp_file}" " >> " "output/$(basename "${pp_file%.uppconf}.conf")"
done

while IFS= read -r line; do
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6ef036f

Please sign in to comment.